-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
repository: Add a File Resource cache to ResourceBuilder #5372
Conversation
e6b04ec
to
51c0d17
Compare
51c0d17
to
a4d466d
Compare
@reckart I changed this PR to move the resource cache usage into ResourceBuilder. This should then benefit all repository types. Please try this update. |
Thanks - installed and testing now ... |
a4d466d
to
044379a
Compare
Signed-off-by: BJ Hargrave <bj@hargrave.dev>
Signed-off-by: BJ Hargrave <bj@hargrave.dev>
Since we are using deferred values to defer expensive operations, we don't want concurrent threads all performing the expensive operation. So we memoize the result of the operation to ensure at-most-once. Signed-off-by: BJ Hargrave <bj@hargrave.dev>
The cache reduces the need to process files to Resource objects, including SHA-256 computation, for unchanged files. Fixes bndtools#5367 Signed-off-by: BJ Hargrave <bj@hargrave.dev>
044379a
to
7b42679
Compare
@bjhargrave I have been using this version:
for the last week. That seems to work well for me. I also have not observed #5378 since. I did not try the latest 7b42679 yet though. I guess I should also test that for a couple of days, in particular since the older version has been force-overwritten again.... |
I have upgraded to 7b42679 now and testing it. |
Looks good so far. 👍 to merge. |
The cache reduces the need to create new Resource objects, including SHA-256 computation, for unchanged files.
Fixes #5367