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

repository: Add a File Resource cache to ResourceBuilder #5372

Merged
merged 4 commits into from
Oct 10, 2022

Conversation

bjhargrave
Copy link
Member

The cache reduces the need to create new Resource objects, including SHA-256 computation, for unchanged files.

Fixes #5367

@bjhargrave bjhargrave force-pushed the issues/5367 branch 6 times, most recently from e6b04ec to 51c0d17 Compare September 21, 2022 01:34
@bjhargrave bjhargrave changed the title repository: Add a Resource cache to FileSetRepository repository: Add a File Resource cache to ResourceBuilder Sep 23, 2022
@bjhargrave
Copy link
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.

@reckart
Copy link
Contributor

reckart commented Sep 26, 2022

Thanks - installed and testing now ...

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>
@reckart
Copy link
Contributor

reckart commented Oct 5, 2022

@bjhargrave I have been using this version:

bjhargrave force-pushed the issues/5367 branch from 51c0d17 to a4d466d Compare 11 days ago

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....

@reckart
Copy link
Contributor

reckart commented Oct 6, 2022

I have upgraded to 7b42679 now and testing it.

@reckart
Copy link
Contributor

reckart commented Oct 10, 2022

Looks good so far. 👍 to merge.

@bjhargrave bjhargrave merged commit 31f140a into bndtools:master Oct 10, 2022
@bjhargrave bjhargrave deleted the issues/5367 branch October 10, 2022 15:10
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.

Performance: debugger source lookup becomes unusable
2 participants