mojohaus / rpm-maven-plugin

http://www.mojohaus.org/rpm-maven-plugin/
Other
56 stars 48 forks source link

Checking for unpackaged file(s) takes too long #59

Closed rombert closed 8 years ago

rombert commented 8 years ago

With version 2.1.5 of the plugin I'm packaging an RPM file which (for now) contains just a large jar file - 81 MB.

With this configuration the 'checking for unpackaged file(s)' step takes around 30 seconds, which is way too much IMO since the build root only contains that file.

dantran commented 8 years ago

you may need to turn off the compression

rombert commented 8 years ago

You're right, that did the trick!

      <defineStatements>
         <defineStatement>_source_payload w0.gzdio</defineStatement>
         <defineStatement>_binary_payload w0.gzdio</defineStatement>
      </defineStatements>

I'm going to close this as my immediate problem is solved, but maybe it would be good to document this, or even add a configuration flag to disable compression. I get the feeling that many (most?) projects repackage RPMs, so compression does not get them much.

As an anecdote, the size of my RPM actually decreased by 1% after applying this change.

dantran commented 8 years ago

Very much appreciated for a PR to add this to http://www.mojohaus.org/rpm-maven-plugin/faq.html

rickard-von-essen commented 8 years ago

This is kind of related to http://www.mojohaus.org/rpm-maven-plugin/ident-params.html#repackJars

rombert commented 8 years ago

@rickard-von-essen repackJars defaults to false, and in my tests this made no difference.

With

openjdk version "1.8.0_91"
OpenJDK Runtime Environment (IcedTea 3.0.1) (suse-3.1-x86_64)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

I get the following results

Settings Time (seconds) RPM size (bytes)
Default 31.890 85222127
No compression 1.058 84432506
Disabling repack 32.006 85224564
rombert commented 8 years ago

@dantran - here's the PR: #61