Use xarray load_async to make WMS router async#136
Open
TomNicholas wants to merge 7 commits into
Open
Conversation
TomNicholas
commented
May 19, 2025
Comment on lines
45
to
+47
| case WMSGetCapabilitiesQuery(): | ||
| return get_capabilities(dataset, request, query) | ||
| return await asyncio.to_thread(get_capabilities, dataset, request, query) |
Author
There was a problem hiding this comment.
I don't really understand the context in which these other functions get called - is it important to make these properly async too?
Author
There was a problem hiding this comment.
My guess is that it's only functions which actually trigger loading of additional chunk data which need to be fully async - if all they do is process metadata that should already be in memory then they don't need to be async.
Collaborator
There was a problem hiding this comment.
Once getmap is good, we need to make all the other methods also load data async instead of using to thread.
They all load data just a little differently than getmap
Author
|
Presumably the CI tests did not run on this PR because I'm a new contributor? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on @mpiannucci 's PR #98 but instead uses the (as yet unmerged) xarray PR pydata/xarray#10327 which adds
da.load_async, which should work when lazily loading zarr data using zarr-python v3 without dask.I deleted this part of #98 because it seemed separable.