Finally something that truly feels promising for #1578 :partying_face:
Here's the gist:
Add a way to check if a slice is already cached (or being fetched) in the store.
Replace useDebouncedCallback with custom useDynamicDebouncedCallback in SlicingSlider that can adjust the debouncing delay on every call.
If the user slides to a slice that is already in the fetch cache, set the debounce delay to 20ms; if it's not, set it to 250ms.
How to test this in practice:
Move the slider thumb one value at a time relatively slowly to request multiple slices
You can now "replay" the fetched slices very quickly
Why this is awesome:
No need to fetch an entire dataset or dimension to start seeing benefits
Benefits all providers and visualizations the same way
No arbitrary heuristics involved
No config needed
Next up, I'll play with prefetching a bit. I reckon if we can cleverly prefetch slices (like the next/previous 10, if they're not too big), we can get a "movie-like" feel. This will of course involve heuristics and maybe also provider-based configuration (i.e. viewerConfig). Either way, this feels very beneficial already!
Finally something that truly feels promising for #1578 :partying_face:
Here's the gist:
useDebouncedCallback
with customuseDynamicDebouncedCallback
inSlicingSlider
that can adjust the debouncing delay on every call.How to test this in practice:
Why this is awesome:
Next up, I'll play with prefetching a bit. I reckon if we can cleverly prefetch slices (like the next/previous 10, if they're not too big), we can get a "movie-like" feel. This will of course involve heuristics and maybe also provider-based configuration (i.e.
viewerConfig
). Either way, this feels very beneficial already!