[CMake] CPack with BZIP2 is a lot slower than GNU tar

Raymond Wan rwan.work at gmail.com
Thu Jun 2 01:14:27 EDT 2016


Hi,


On Wed, Jun 1, 2016 at 8:26 PM, Alessio <masariello+cmake.org at gmail.com> wrote:
> Is anyone else having problems with the speed of cpack?
>
> Out of one of our code bases we produce two packages on Linux using the
> BZIP2 generator with CMake 3.4.0. I provide a few stats on the packages
> below. They are not particularly fat. GNU tar will take ~1min to tar the
> biggest one up with the same compression tech.
>
> CPack takes a good 4~5min for each of them.


I have to admit that I'm not a cpack user.  So, I'm not sure if I can help.

But are you comparing:

"cmake + bzip" versus "cmake + tar"?

By default tar doesn't do any compression.  It concatenates all of the
files together.  That might be why it is so fast.  Perhaps you can
remove cmake from the equation and compare bzip with tar?  I *guess*
the speed difference might be the same and perhaps unrelated to cmake.
(Just my guess, of course.)

On the other hand, if speed is an issue, consider using gzip.  It
won't compress as well as bzip, but it should be faster in terms of
compression time.

Ray


More information about the CMake mailing list