repository: Add a File Resource cache to ResourceBuilder#5372
Merged
bjhargrave merged 4 commits intobndtools:masterfrom Oct 10, 2022
Merged
repository: Add a File Resource cache to ResourceBuilder#5372bjhargrave merged 4 commits intobndtools:masterfrom
bjhargrave merged 4 commits intobndtools:masterfrom
Conversation
e6b04ec to
51c0d17
Compare
51c0d17 to
a4d466d
Compare
Member
Author
|
@reckart I changed this PR to move the resource cache usage into ResourceBuilder. This should then benefit all repository types. Please try this update. |
Contributor
|
Thanks - installed and testing now ... |
a4d466d to
044379a
Compare
Signed-off-by: BJ Hargrave <[email protected]>
Signed-off-by: BJ Hargrave <[email protected]>
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 <[email protected]>
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 <[email protected]>
044379a to
7b42679
Compare
Contributor
|
@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.... |
Contributor
|
I have upgraded to 7b42679 now and testing it. |
Contributor
|
Looks good so far. 👍 to merge. |
reckart
approved these changes
Oct 10, 2022
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.
The cache reduces the need to create new Resource objects, including SHA-256 computation, for unchanged files.
Fixes #5367