Skip to content

Add support for more compression types - #118

Closed
afbjorklund wants to merge 27 commits into
ccache:3.4-maintfrom
afbjorklund:compression
Closed

afbjorklund wants to merge 27 commits into
ccache:3.4-maintfrom
afbjorklund:compression

Conversation

@afbjorklund

Copy link
Copy Markdown
Contributor

This adds support for compression type, in addition to the compression level...
While doing so, it also makes the default level compatible by changing it to -1.

Included (and bundled) is support for the lz4f format, which is faster than gzip.
Also evaluated were lzop and snappy, but only the detection remains here.

@jrosdahl jrosdahl added the issue: feature New feature label Jul 24, 2016
@jrosdahl

Copy link
Copy Markdown
Member

Sounds like a good idea. Should we perhaps introduce support for different compression types as plugins for the same reason as discussed in #58?

@afbjorklund

Copy link
Copy Markdown
Contributor Author

Yeah, probably ? Another reason for doing that, is that it could keep the "api" between different implementations sane - instead if the current copy/paste between different code forks ?

@afbjorklund

Copy link
Copy Markdown
Contributor Author

And again, like #80, this could do with a more standardized benchmark for evaluating ?

@jrosdahl

Copy link
Copy Markdown
Member

Yes, would be nice.

@afbjorklund

Copy link
Copy Markdown
Contributor Author

Also thinking about just deleting the alternative compression (i.e. lzop and snappy)
And avoid the complexity about the plugin system, when it is not really needed...

The stand-alone lzop (minilzop and minilzo) is not really as stable, and not as fast.

http://www.lzop.org/

And the snappy both has all the C++ complexity, or the unofficial C port uncertainty.

http://google.github.io/snappy/

So think I will just drop their detection in the rebase, and avoid using any others.
Better to add the in-memory compression of manifests (using zlib) in that case...

@afbjorklund

Copy link
Copy Markdown
Contributor Author

Ouch, that rebase was hard. All the code changed (to C99) and with it all the comments (to //)...
Missed more than a few spots, but hopefully the tests caught most of it so that it's not broken now.

@jrosdahl

Copy link
Copy Markdown
Member

Ouch, that rebase was hard.

Sorry about that.

A tip for the future: I have found git-imerge to be very handy in situations like this.

@jrosdahl jrosdahl added this to the 3.4 milestone Oct 18, 2016
jrosdahl and others added 6 commits February 17, 2018 10:51
* 3.4-maint:
  Hash preprocessed headers located in “.gch directories” correctly
* 3.4-maint:
  Fix paths to bundled zlib
Refactor everything, both code and test.
ccache version 3.4

Everything got renamed/moved, and split up into files...
Needed to fix the bundled zlib
@afbjorklund

Copy link
Copy Markdown
Contributor Author

Another major rebase, for 3.5 this time. Saved the old stuff as compression-3.3

@afbjorklund

Copy link
Copy Markdown
Contributor Author

Hmm, seems like Travis have upgraded to Clang version 5.0 ? (from 3.8)

@afbjorklund

Copy link
Copy Markdown
Contributor Author

Darnit, the Travis clang static analyzer is not the same as the regular one in clang 5.0.0

src/util.c:318:4: warning: Potential leak of memory pointed to by 'p'
                        cc_log("unknown size: %ld", (long) info.contentSize);
                        ^~~~~~

Time to clean up.

@afbjorklund
afbjorklund changed the base branch from master to 3.4-maint February 3, 2019 21:19
@afbjorklund

Copy link
Copy Markdown
Contributor Author

Oops, seems like I had already merged some things from master (after 3.4 was branched)

Anyway, the intention was to indicate that the code was written against an older ccache...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

issue: feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants