Closed LucasThompson closed 7 years ago
Would it just work?
No, not as things stand, at least not for matrix shapes (others may vary). Matrix caches its data into images once, between render and update phases.
Perhaps an argument for extracting the cache stuff? i.e. the backing data for a layer is itself a cache, the layer would be constructed with a cache object for the data property
Only the shape knows what sort of cache it needs.
This is mainly an upstream dependency issue: piper-audio/piper-js#3
For later reference: It seems posting a message from the worker for each feature block swamps the event queue, and results in the overall extraction taking significantly longer. I may have missed something and it is actually something else, but that is my current understanding.
For now, I throttle the messages, sending one with the features so far when (blocks to process / total blocks to process) * 100
increases by one, ultimately to update the progress bar.
Rendering features as they're calculated, a la Sonic Visualiser, might be nice - if not just because it provides meaningful feedback to the user.
Some limitations as it stands: