4 ms·
Thanks for the feedback! It's true that Shiny isn't designed for blazing performance (it's built on R, after all) but the pensions app is particularly slow--I
by jcheng 13y ago
Thanks for the feedback!
It's true that Shiny isn't designed for blazing performance (it's built on R, after all) but the pensions app is particularly slow--I believe it's actually the calculations, not the plotting, that's so slow. It is also running on one of our free hosting accounts, that only allocates a single, single-threaded R process to service it; so you're competing with all the other visitors to that app for the attention of a single thread.
I'd encourage you and anyone else who might find Shiny useful to try it with your own data and your own scripts. You might be surprised at how decent the performance can be, especially once you've gotten your head around reactive programming and learn how to structure your code to take advantage of it.
That said, Shiny is definitely not designed to be a general purpose web development framework. It is specifically designed for R users to build single-page apps for analyzing and/or visualizing data. Rather than replacing Rails, it is aimed at replacing PDFs and LaTeX documents, which is the usual way R users pass their results around.
- minimaxir 13y agoThanks for the response. That seems fair, and I'll definitely give it a shot. :)
- macarthy12 13y agoIs there any way to cache, or memorize calculations in Shiny?
- Blahah 13y agoYes, the whole paradigm is to use 'reactive' functions - i.e. functions whose output is cached.
- macarthy12 13y agoI guess I'm wondering it cache across requests?
- jcheng 13y agoIn the Shiny framework we think less about short-lived HTTP requests, and more about long-lived (websocket) sessions. Reactive expressions cache their results within or across sessions, depending on where they are declared (this is just a natural result of R's lexical scoping). http://rstudio.github.io/shiny/tutorial/#scoping http://rstudio.github.io/shiny/tutorial/#scoping