BSDiff for cache objects
Bogdan Harjoc <[email protected]>
| Newsgroups | gmane.comp.compilers.ccache |
|---|---|
| Message-ID | <CAF4+tmpjGK1HGfF_zK5+E_2CUMHdwvrCGPc0sM02mcbj76ffNw@mail.gmail.com> |
I just did a quick search, and couldn't find discussions on the idea of caching compiled objects as binary diffs from other existing objects. Basically, before writing a new object file, ccache could find a similar object in the cache (based on object-code or source-code hashes for example) and store the delta (using bsdiff, xdelta, ...) instead of the complete file. For most minor source code changes, the savings should be worth the extra effort. Alternatively, a "compact" operation could be run periodically, that compresses the cache using the same approach. My question is whether ccache's real-world use would benefit from a feature like this. I can put together a test that looks through people's .ccache and reports how many "good bsdiff candidates" there are, and what the savings would be. Any opinions ?