Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPM creation is hella slow? #195

Closed
timperrett opened this issue Mar 18, 2014 · 8 comments
Closed

RPM creation is hella slow? #195

timperrett opened this issue Mar 18, 2014 · 8 comments
Labels

Comments

@timperrett
Copy link

Hey guys,

So this is a somewhat strange issue, and im not sure if it can even be fixed, but the creation of RPMs is horridly slow; does anyone else see this? Perhaps this is just part of rpmbuild and its the way things are?

If there is anything that can be done on the native packager side that would be awesome :-)

Cheers!

@muuki88 muuki88 added the rpm label Mar 18, 2014
@muuki88
Copy link
Contributor

muuki88 commented Mar 18, 2014

Hi Tim,

Can you give us some numbers? Like

  • How many custom mappings
  • How many library dependencies
  • How big is the resulting rpm in MB
  • On what machine are you building (RAM, CPU, SSD or HDD)

Our small tests don't take long. A plain play-application takes a few seconds.
We have some issues with debian as well due to the manually chowning of files. See #142

thanks,
Muki

@timperrett
Copy link
Author

  • 2 custom mappings
  • library dependencies vary, but lets say average of 5 or 6 direct dependencies (and then transitive)
  • RPM is typically 50mb all told.
  • Building on an EC2 slave, m1.large

Cheers

@jsuereth
Copy link
Member

Which version of sbt? (There's a fun file-security based performance issue in sbt 0.13.1)

@ytask
Copy link

ytask commented Mar 19, 2014

Hi, had problems with slow rpm creation, too. Maybe disabling the optimizer brp-java-repack-jars will solve it. Redefine the RPM macro __os_install_post by adding the following to rpmPre in Rpm:

%define __os_install_post
/usr/lib/rpm/brp-compress
%{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}}
/usr/lib/rpm/brp-strip-static-archive %{__strip}
/usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump}
%{nil}

Helpful link regarding repacking: http://swaeku.github.io/blog/2013/08/05/how-to-disable-brp-java-repack-jars-during-rpm-build/

Cheers

@muuki88
Copy link
Contributor

muuki88 commented Mar 19, 2014

Thanks @ytask ! I will test this option, too and if it works ( = doesn't break anything) we add an option to enable this behavior. If this works for all of you, we may enable it per default?

@timperrett
Copy link
Author

I'm using SBT 0.13.1 @jsuereth - upgrade needed?

@timperrett
Copy link
Author

@ytask @muuki88 @jsuereth - i implemented @ytask's suggestion, and holy cow, build time went from 309 seconds to 19s... huge time saving!

@muuki88
Copy link
Contributor

muuki88 commented Mar 19, 2014

Thanks for sharing. We will integrate this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants