Skip to content
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

Update Directory artifacts to use blobs #7

Merged
merged 8 commits into from
Jan 28, 2024
Merged

Update Directory artifacts to use blobs #7

merged 8 commits into from
Jan 28, 2024

Conversation

kylewlacy
Copy link
Member

This PR updates how Directory artifacts are represented: rather than storing a map of file/entry names, it now stores a blob ID (much like a file artifact does). The blob referred to by this ID will then contain a (canonicalized) JSON payload that can be deserialized into a DirectoryListing structure (which in turn, contains a map of file/entry names).

This new representation was inspired by Git's representation of directories, which internally use "directory tree objects", or plain text files listing the other objects making up the directory's entries (I found the "inside .git" zine especially helpful for understanding this!)

I was hoping this new implementation would be noticeably faster. While testing did show some improvements in some areas, it was only on a scale of 10-100ms or so. The main reason I pressed forward with this implementation anyways was because I felt like introducing this layer of indirection was a bit cleaner, and could make some future work easier (hopefully, anyway!)

@kylewlacy kylewlacy merged commit c206980 into main Jan 28, 2024
4 checks passed
@kylewlacy kylewlacy deleted the directory-trees branch January 28, 2024 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant