Black Lives Matter. Please consider donating to Black Girls Code today.

CPU usage in RStudio

Hi,

When I run the following code in my RStudio console and view the plot in the viewer pane, after about ten minutes the CPU usage of rstudio.exe climbs from an expected 5% to 30 %. I did not interact with the graph. It seems simply displaying a plot in rstudio for a while hogs a lot of cpu. I am using plotly version 2.0.16, R version 3.2.3, and RStudio version 0.99.491. Why is this happening and how can I fix it?

plot_ly(z = volcano, type = "surface", zmin=0,zmax=3000)

Thanks

I am also experiencing this issue. When I view a plotly plot in the Viewer pane, the CPU usage steadily grows, the memory and commit size constantly adjust sizes, and the number of page faults steadily increases. It seems like it is constantly reading/writing to the page file. After about 5 minutes, the CPU usage is at 20% and the number of page faults is ~15,000,000. After 10 minutes, 30% CPU usage and 65,000,000 page faults. It doesn’t seem to ever rise much above 30% CPU usage, but the number of page faults continues to increase. As soon as I remove the plot from the Viewer pane, the CPU usage goes back down to 0, the number of page faults stops increasing, and the memory sizes no longer change. I don’t experience this problem using the built in plot() functions either - it only happens with plotly plots.