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

Why is standalone app package so big? Does it reduce fat in future? #473

Closed
janckerchen opened this issue Nov 3, 2013 · 12 comments
Closed

Comments

@janckerchen
Copy link

I just package simple-sound.rb and get standalone app for mac with hug size >200M!

JDK is about 100M, I think JRE is enough for end user.

Is there space for optimize?

@PragTob
Copy link
Member

PragTob commented Nov 3, 2013

Hi there,

yes there is lots of space for optimization there. We are in a pre alpha stadium and the current packaging implementation is by no means done (actually packaging isn't really scheduled to ship untilt he RC1). Most of the packaging code (or well.. almost all of it) is in the furoshiki code.

Thanks for the report,
Cheers Tobi

@davorb
Copy link
Member

davorb commented Nov 4, 2013

200M sounds way to big. If I'm not mistaken, there we some talk about this on the mailing list and we got it down to ~35MB fairly easily. I have no idea why it's so big again.

@PragTob
Copy link
Member

PragTob commented Nov 4, 2013

Maybe it was just talk and we didn't implement it yet? :-)

I also feel like there was some talk about that on either the ML or an issue here, would be great if somebody could digg that up (I tried yesterday but failed)

@davorb
Copy link
Member

davorb commented Nov 4, 2013

I'm 99.9% sure that it was in. I think what might have happened after that is that the package got bloated again. In any case we need to look into it.

@PragTob
Copy link
Member

PragTob commented Nov 4, 2013

Okay I'll make an issue on furoshiki and cross reference.

@janckerchen
Copy link
Author

I make sure it's big, mac standalone has 216M, jar file has 106M

no picture, no truth:)

image

Dig into jar file, found MB killer is nokogiri-1.6.0, about 75M

image

@PragTob
Copy link
Member

PragTob commented Nov 4, 2013

No pictures needed, we believe you but thanks anyway! =) 👍

Will have to check what goes into that JAR.. SWT library shouldn't be that big etc. Or well... for the JAR it probably packages all SWT libraries which already gets you quite some amount. Plus JRuby. Hmmm.

@janckerchen
Copy link
Author

Dig into mac standalone app, JDK is 104M
image

swt libary only has 17M if it means swt-0.18

image

@wasnotrice
Copy link
Member

yes, 200MB is too big ;)

35MB is about the lower limit for the JAR. If it's approaching 100, there's extra stuff in there. At one time shoes/static was bloating JARs. That might still be the case. JAR should be pretty much:

  • swt ~ 17MB
  • jruby ~ 14MB
  • other gems ~ 3MB

I'd love to slim the packages down as much as possible, so if we can get by with JRE, that would be great :)

@PragTob
Copy link
Member

PragTob commented Nov 4, 2013

Let's transfer the majority of this discussion to the packaging gem and keep it open here for tracking purposes: shoes/furoshiki#9

I'll repost what Eric just posted there.

In the other thread it was mentioned that nokogiri takes up 60MB which baffles me. But yeah, over there...

@MichaelDimmitt
Copy link
Contributor

I know this shouldn't be here but I wanted to mention it. @PragTob
Wrote a nifty script. My install uninstall package is fairly simple. So I removed all of the gems that I could from the jar file. Shrunk the Jar file down from 63mb to 35mb with program retaining functionality. Now I'll take a look at shoes/furoshiki because the script I wrote is a bandaid. For my specific small project. https://github.com/MichaelDimmitt/aerial_desktop_with_shoes/blob/fb4fa115d0825db72e4df03b2a6d3d5bb9df948c/script.sh

@jasonrclark
Copy link
Member

jasonrclark commented Sep 27, 2017

There's definitely more room to trim, but I'm comfortable with the 65MB that we've gotten it down to for now (i.e. probably through the 4.0 release). Might be worth at least cutting out the biggest files (i.e. the duplicate jruby jars we slurp in because of our gem dependencies), but I'm willing to let that ride to focus on other aspects and handle it over in shoes/furoshiki#9 at some point.

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

No branches or pull requests

6 participants