Skip to content

Cache doc and license storage buckets #3232

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

Merged
merged 2 commits into from
Aug 14, 2024
Merged

Cache doc and license storage buckets #3232

merged 2 commits into from
Aug 14, 2024

Conversation

emcfarlane
Copy link
Contributor

For large repositories, buckets can be slow to iterate over. Use memory backed buckets to reduce file access for both doc and license files. This can speed up builds by up to 2/3 on large repositories by avoiding iterating over os storage buckets. As an example running build of a single proto file in a large workspace of 96k files takes 1.60s with v1.36.0, 1.06s with v1.31.0 and 0.56s with this change.

This is a simpler approach to #3230 but can be used in conjunction with it.

For large repositories, buckets can be slow to iterate over. Use memory
backed buckets to reduce file access for both doc and license files.
This can speed up builds by up to 2/3 on large repositories by avoiding
iterating over os storage buckets.
@emcfarlane emcfarlane requested a review from bufdev August 12, 2024 19:22
Copy link
Contributor

github-actions bot commented Aug 12, 2024

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedAug 12, 2024, 7:36 PM

@emcfarlane emcfarlane requested a review from doriable August 12, 2024 19:24
Copy link
Member

@doriable doriable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a reasonable, even if we do not end up taking the approach of restricting the walks in the storage layers (#3230). There is just no reason to need to access the doc and/or license files on disk within a single execution context of the CLI. However, will have others chime in on their thoughts.

@emcfarlane emcfarlane merged commit fd8006c into main Aug 14, 2024
11 checks passed
@emcfarlane emcfarlane deleted the ed/memMetaFiles branch August 14, 2024 17:16
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.

3 participants