-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 2 and 3d async chunked loading #22
base: main
Are you sure you want to change the base?
Conversation
asynchronous 3d chunked loading! Screen.Recording.2024-06-10.at.8.41.55.PM.mov |
note to self... some array types (such as tensorstore and dask arrays) provide their own async chunk retrieval and futures patterns. There should be a way to defer to those for array types that support it |
@tlambert03 finally back from a workshop and checking this out properly - it's wonderful, you're my favorite :) |
:) thanks |
this sounds like fun, let's find a time to chat - will ping |
this draft PR moves much of the logic for indexing into data into a Chunker class that takes care of the asynchronous requests to the data store, and yields chunks back to the viewer, which then need only worry about putting them at the appropriate place/channel in the canvas. It's working pretty well (note that in the demo, I've added an artificial sleep of 20 ms to every individual chunk request, and chunked it overly dramatically)
This demo shows:
(64, 32)
, to show that square chunks are not necessary. Obviously, the performance benefit here would depend on aligning chunk requests with the chunks of the storage.Untitled.mov
the implementation should extend to 3d relatively straightforwardly. Ultimately, all that the chunker cares about is that you tell it the full extent of the data you want, and how you'd like to chunk it up, and all the viewer cares about is receiving the final chunks, and the offset required to place them on the canvas
lots of cleanup needed, and need to make sure that it doesn't affect performance of the simple cases