magland / figurl-franklab-views

0 stars 0 forks source link

Animation state should not embed the frame contents #1

Open jsoules opened 2 years ago

jsoules commented 2 years ago

Right now, the AnimationState<T> type includes a bunch of control information, but also an array of frameData which are the actual data for display for individual animation frames. This was chosen for convenience (since it means that data display is entirely self-contained from within the state object) but upon reflection, it would be better not to embed the largest part of the memory use within the state itself--we would be better off using frame counts, and having some sort of reference that can load the needed frame data when needed, either from a separate in-memory list or from some streaming setup or fetch cache.

Decoupling these things would hopefully make the animation itself more responsive and would make a way forward for dynamically loading frame contents, which will be necessary as the animation sizes get larger.