Addresses issue 193#205
Merged
goneall merged 28 commits intospdx:masterfrom Sep 16, 2023
pmonks:issue-193
Merged
Conversation
…heckIntervalSecs for even better control over the cache
…Store's new cache
…Store's new cache
…nse.ListedLicenses and make it generic
…l beyond the WebStore
Collaborator
Author
|
In my testing locally (on a 4yo MacBook Pro), when the cache is enabled and the entire SPDX listed license & exception corpus is accessed, ~620 files totaling ~20MB are stored in the cache. There are the same number of metadata JSON files written, though they are much smaller (~2MB in total). Once the cache is fully populated, the time the library spent loading the corpus went from ~4 minutes to ~1 second. |
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.
This PR addresses issue #193 by adding a configurable download cache to the library, and updating
org.spdx.storage.listedlicense.SpdxListedLicenseWebStoreto use that cache. This new cache is disabled by default.Note that this PR also adds a test-only
log4j2-test.xmlfile to the test resources of the project, but for some reason it doesn't seem to be getting picked up. After some thought I came to the conclusion that it's probably worth leaving this file in the source code as a visible reminder that it would be great to get to the bottom of that.Note:
mvn -Dorg.spdx.storage.listedlicense.enableCache=true test