Working with ggplot
and shiny
, and plotting a lot of data to generate some interactive plots.
I have some performance problems, so I've checked with benchplot()
my plotting time, and some of the big plot's are slow. For example, this is the time that it took me to plot one of those plots-
step user.self sys.self elapsed
1 construct 0.093 0.005 0.101
2 build 1.528 0.044 1.583
3 render 3.292 0.070 3.446
4 draw 3.102 0.189 3.521
5 TOTAL 8.015 0.308 8.651
I can't plot with ggvis
or ggbio
, because they don't have faceting, which is essential.
Is there a way to cache the constructing, building and rendering of the plot, so I only need to draw it asked, and can save half of the time?
(saving pictures is not a possibility, because the plot are interactive)