feat: Listings Caching implementation using fsspec dircache#93
Merged
Conversation
cwognum
requested changes
Apr 9, 2024
cwognum
left a comment
Collaborator
There was a problem hiding this comment.
Nice optimization @lmtroper !
There is a more official implementation that simplifies the code further. It's not very well documented, but what I did was to go through an existing implementation to understand how this can be used.
The good news - You reached a very similar solution! Great minds think alike! 😉
cwognum
reviewed
Apr 9, 2024
cwognum
approved these changes
Apr 9, 2024
3 tasks
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.
Changelogs
Implementing a listings caching system using fsspec's dircache to reduce the number of
lscalls made during zarr upload/download.The fsspec
info()method was the method that was resulting in all of thelscalls being made during upload so I tried targeting this method by using a listings caching. Given that listings caching is activated, each call tolschecks the path for cached listings and if none are found, it will check the listings for the parent path. This was an idea to solve the problem of checking child paths even though we learn that the parent path is empty:Profiling with listing caching: