entropy-lab / entropy

BSD 3-Clause "New" or "Revised" License
30 stars 13 forks source link

Dashboard caching figures #278

Closed urig closed 2 years ago

urig commented 2 years ago

This PR speeds up the dashboard results page's UX.

Previously when the user selected an experiment, the page would reload all FigureRecords for all selected experiments from disk. This meant that the more experiments were selected, the longer it took to re-render the plot tabs, up to several seconds per experiment.

This PR introduces caching of the FigureRecords in memory. This reduces the time to re-render plot tabs significantly as it makes it proportional to the number of figures for the experiment newly selected (instead of all figures for all experiments selected).

The PR also adds a spinner that spins while the plot tabs box is reloading.

⚠ Known issue: Cached FigureRecords are not removed from server memory and may accumulate. To clear from memory, a server restart is required.

github-actions[bot] commented 2 years ago

Unit Test Results

239 tests   235 :heavy_check_mark:  56s :stopwatch:     1 suites      4 :zzz:     1 files        0 :x:

Results for commit 932f8195.