Riksrevisjonen / pioneeR

R package for running a Shiny app for DEA analysis
https://riksrevisjonen.github.io/pioneeR/
GNU General Public License v3.0
6 stars 2 forks source link

Consider implementation of memory-based caching for main DEA (e.g. `compute_*)` functions #88

Closed Aeilert closed 2 weeks ago

Aeilert commented 5 months ago

I don't think performance is a big issue with the app, since most datasets are small and calculations are relatively fast, but it struck me that a further benefit of #80 together with #87 is that it would be easy to add in-session caching for some of the workhorse functions. This is particular relevant for large datasets (like Hospitals), bootstrapping and possibly some advanced productivity cases. By caching functions like compute_efficiency() and process_boot() we could speed up these calculations substantially.

I don't think this is something for planned releases (0.4.0 / 0.5.0), but maybe something to consider for later releases.

cc: @ohjakobsen

ohjakobsen commented 5 months ago

This is actually quite easy to implement with the bindCache() function. It could be added to the main reactive objects for the dea model and the bootstrapped model. I will look into this as soon as #82 is merged and make it ready for the 0.4.0 release. It can have a huge benefit for bootstrapped models, even on mid sized data sets.