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

Alessio masariello+cmake.org at gmail.com
Thu Jun 2 05:29:57 EDT 2016


I'm comparing the following two things:
  1. cpack TBZ2 generator
  2. "tar cjf" the same files as with cpack. (j option = BZIP2 compression)

I cannot avoid CPack. It takes care of way too many little details of the
packaging. Obviously we use it via lots of install() statements in our
CMakeLists.txt files.

On 2 June 2016 at 06:14, Raymond Wan <rwan.work at gmail.com> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160602/08c78fbb/attachment.html>


More information about the CMake mailing list