-
Notifications
You must be signed in to change notification settings - Fork 116
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
squashfs: add configurable block cache #206
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't mind some performance test on this, but not for me to complain.
Do you want to add a comment somewhere (likely in squashfs.go, or in doc.go) about why we have a cache for this, capture some of your thoughts from the PR and issue?
5f96587
to
acf5352
Compare
Were you thinking of a Go benchmark? Here are some with rclone - unpacking my favourite tensorflow 3GB squashfs with rclone
Whereas
I've added some notes to the Filesystem.Read method which is where the cache gets initialized - this will appear in the Go doc and be hopefully obvious to the users. Interestingly the squashfs kernel module uses the same design choice (which I hadn't noticed before) about having a fragment and metadata cache. Note that this PR will conflict with #201 I think, which I'll fix up. |
acf5352
to
5792711
Compare
Oooh, you merged that while I was writing the above! It is now fixed. |
I think this is solid. Do you want to throw a benchmarking doc in there? You captured much of it here, but this tends to get lost. Specifically either in the |
I added some info about benchmarks here What do you think - look ok? |
Actually I forgot to say how I made the file, let me add that! |
…#205 This also adds methods to set and read the size of the cache.
This adds a configurable block cache as discussed in #205
This is done in 3 commits for ease of review - it compiles and the tests pass at each commit so they can be merged as 3 commits if desired.
With this cache this now performs within a factor of 2 of unsquashfs