Repository navigation
Add command to show compression statistics, and a tool to compress - #275
afbjorklund wants to merge 8 commits into
Conversation
By default, only the .manifest are being compressed. It is possible to use different compression levels...
The decompression speed does not depend on method, so (re)compress the cache using the --best method.
Doing compression on large directories takes "forever", so default to --fast and use --best only if instructed.
It is more efficient to compress several at a time, instead of doing just one with available processors.
The terminology is a bit confused, but have it match whatever gzip --list is outputting. Sometimes known as "space savings" instead, so list both values to make it more obvious.
|
Just passing through, but this would be a really nice improvement! |
|
I'd rather wait with this until we have decided the future of aggregated files (#218) and if we should switch to LZ4, either as the only compression algorithm or as the default of several. Does this sound reasonable? |
|
I think it is just one more function to the compression "API", in order to dry-run the compressed file. |
|
Now that the work related to aggregated files and compression has settled, I think that this feature would be awesome to have in the upcoming ccache version. @afbjorklund: Would you be interested in reworking this PR to work with the new file formats and to implement recompression in ccache itself instead of a standalone tool? (If not, I can have a look at it myself, no problem.) I'm imagining one option for showing compression statistics, just like the proposed Thoughts? |
|
The main problem with the recompression is the threading, but I suppose it can start out single threaded. |
I agree, no need to parallelize in a first version. |
|
Will close this PR, and make a new one for the new format |
|
Reimplemented in #440 |
For reference, I've now implemented -X/--recompress (d8e2ab9) after a rather large refactoring of the code for reading/writing manifests and result files. I also made a threaded implementation as a follow-up (b0bf95c). Testing and opinions on the corresponding documentation (or code, for that matter) would be welcome. |
By default only the .manifest files are compressed, but add a tool to measure the amount of compression.
Also do a small wrapper to help compress all files with
--fast, optionally to recompress using--best.For large cache directories, compressing will take a long time... But decompression should be fast.
Once the benchmarking tools have been updated, they should have more compress options as well...
Part of #274