diskfs / go-diskfs

MIT License
494 stars 112 forks source link

squashfs: cache the last block decompressed in the file for 10x speedup #202

Closed ncw closed 8 months ago

ncw commented 8 months ago

Before this change, we would spend an awful lot of CPU time reading and decompressing the same block to only read a small part from it.

This change caches the last block used in the file handle and for typical block sizes used in reads this makes a 10x difference in throughput.

deitch commented 8 months ago

This is great. Solid improvement.