trelliscopejs icon indicating copy to clipboard operation
trelliscopejs copied to clipboard

Parallel rendering of panels

Open hafen opened this issue 9 years ago • 4 comments

Provide the option for parallel rendering of panels. For this, to retain progress bars, we may need to look into pbapply (https://github.com/psolymos/pbapply) since it can do progress bars for parallel.

hafen avatar Oct 27 '16 19:10 hafen

Yes please. 🙏

writing panels       [=---------]   6% 184/3075 eta:11m

colinbrislawn avatar Jun 28 '17 20:06 colinbrislawn

To provide some additional discussion on this, since the purrr family of map functions is used, any updates to purrr to provide parallel computation would be automatically leveraged here.

I am working on functionality right now that will allow you to defer the computation of the panels until they are requested by the trelliscope viewer. This would make your initial display creation nearly instantaneous, but it could take some more time to get individual panels when viewing. It will use a cache to not re-render panels that have already been requested. However, this approach has the downside that without pre-generating all the panels, you have to have R running as a server in the background, making it more difficult to deploy the display for others to view. I'll make an announcement when this is up.

In the mean time, I presume in the output above you are using ggplot2? I've found that when feasible using a different graphics system can sometimes result in an order of magnitude faster rendering time. Usually the speed of ggplot2 is not an issue (when creating a single plot) but it really starts to be noticeable when making a lot of plots.

hafen avatar Jun 28 '17 21:06 hafen

Thanks for the update. I look forward to this option.

The original trelliscope packages does just-in-time graphing really well. I really like that trelliscopejs makes stand-alone graphs without an R server; in my mind, this is one way it differentiates itself from the previous version of trelliscope.

I am indeed using ggplot2. Good guess! I also tried your package rbokeh, which 10x faster on the same dataset. Any suggestions on other fast graphing packages that do all their rendering in the browser?

colinbrislawn avatar Jun 28 '17 22:06 colinbrislawn

For general-purpose plotting, besides rbokeh there is plotly and a few others. I haven't done a comparison of speed on these, but I would assume it's comparable.

hafen avatar Jun 29 '17 06:06 hafen