fix: output_cache.go is still using mtime instead of hashing#7
Draft
zzzz465 wants to merge 4 commits intogoforj:cmilesdev/custom-loaderfrom
Draft
fix: output_cache.go is still using mtime instead of hashing#7zzzz465 wants to merge 4 commits intogoforj:cmilesdev/custom-loaderfrom
zzzz465 wants to merge 4 commits intogoforj:cmilesdev/custom-loaderfrom
Conversation
1fa0d8f to
06ea3a6
Compare
06ea3a6 to
ea99707
Compare
Member
|
Looks like you've got some issues on this branch, I'm going to need a bit before I can take a look at this caching issue you've ran into. |
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.
in previous #5 I introduced hash-based caching in discovery_cache.go and artifact_cache.go. however, I missed that I also need to patch output_cache.go which has the most impact on decreasing wire time.
this PR changes mtime based on hashing in output_cache.go, with replacing existing hashing mechanism from standard sha-256, to xx3, which appears to be more performant (note that I/O bottleneck is significant so this won't make any big difference)
also, I need to mention that hash-based equality checks naturally incur I/O, which is way slower than mtime.
in local environment, previous mtime based caching is faster than hashing, which is not possible in CI environment where mtime is always reset.
since now there's three cache (output, artifact, discovery), I did benchmark test on my private repository to see how it works with/without each cache. below is the result.
the best bet is to provide an option to choose which one to use key: mtime or hash, so user can select