RenderPlot with plotOutput in Shiny with speed issues

Is renderPlot in server.R paired with plotOuput in ui.R slow? It looks like it's because I tried two build methods. The first one involves using the rCharts tall charting library. My plotting function using tall charts rendered each graph in about 0.007 to 0.01 seconds, while my graphing function using a lattice rendered each graph in the range 0.003 to 0.004 seconds, faster than my graph functions as expected. However, when I use the lattice in shiny shape, I use renderPlot and plotOutput (the standard way to display plots in shiny shape), and it is slower than my highchart version, which includes renderChart2 and showOutput, as described here:

rCharts with Highcharts as a brilliant app

I can tell it appears slower because I am using animation, with a new plot display per tick of the animation. In other words, I have a slider like this:

  sliderInput("animation",
              "Animation",
                  min = 1,
               max = 20000,
                 value = 1,
                  step = 1,
                  animate = animationOptions(interval = 30, 
                            playButton = icon('play', "fa-3x"),
                            pauseButton = icon('pause', "fa-3x")))

      

So the ticks happen once every 30 milliseconds, and given that the graph will be displayed after 4 milliseconds, I was surprised when my plots were still lagging between ticks, whereas the slower rCharts high charting charting function has no lag. Is there a solution to this? If you need more information, I'll happily edit this post to include it, but I'm pretty sure it's related to render in conjunction with plotOutput (used for the grid plotting function) versus renderChart2 paired with showOutput (used for rCharts tall charts plotting function) because these are the only two things I have changed in my shiny app, other than of course the plotting functions. I've also been featured in microbusiness, and the averages, median,the min and max were all faster for the lattice plotting function compared to the high charting charting feature. Any help would be greatly appreciated! Thank!

+3


source to share





All Articles