webr icon indicating copy to clipboard operation
webr copied to clipboard

plotly takes twice as long as ggplot2 at 30 seconds

Open bugzpodder opened this issue 1 year ago • 1 comments

library(ggplot2)
ggplot(df, aes(x=activity_mean, y=concentration)) + geom_point()

takes 15 seconds. Change ggplot2 to library(plotly) takes 30 seconds to run. Cache is enabled and plotly is loaded via disk cache

bugzpodder avatar Oct 16 '23 23:10 bugzpodder

Similarly to #306, I believe this is a consequence of package loading -- the plotly package depends on more packages (70) than ggplot2 (28).

Nevertheless, this should be improved in the next version of webR. The latest development build of webR at https://webr.r-wasm.org/latest/ takes about 2.5s to load plotly (from disk cache) for me now.

georgestagg avatar Oct 31 '23 15:10 georgestagg