Closed matdillen closed 2 years ago
The plot output objects are already specific for each tab. How much delay are you seeing? (I get max 1 second delay when testing this.)
Currently the plots (and other output objects) need to be re-rendered each time a tab is switched (only the calculations for each analysis are saved). I could change it to keeping all outputs for each analysis, so that they don't need to be re-rendered, but that will fill up memory much faster when doing several analyses?
You could store the plots in memory, not the other outputs objects. They should not be that big.
I actually would need to save the filtered dataset I think, since the plot would need to remain reactive to filters. (so in case of no filters, this is taking up twice as much memory (unfiltered dataset + filtered dataset), so this might become a problem for large datasets... (it was a problem keeping multiple copies for the MIDS calc script for a dataset of 4.7mil records at least))
True. I suppose you could store the plots as last filtered and recalculate if filters get adjusted. This would address the delay when shifting tabs.
But let's leave this issue at a lower priority for now.
When changing between results tabs, results from the previous tab stay until the ones for the new tab are loaded. This may make it a bit easier to compare different results, but it's also confusing and will probably not always behave in the same way - as it depends on dataset size.
By making a plot object specific for each tab, previous results won't be re-used. This may not be fully optimal either. Probably some function to export plots and tables is needed.