shoes / furoshiki

Distribute Ruby GUI apps easily.
https://github.com/shoes/furoshiki
Do What The F*ck You Want To Public License
36 stars 6 forks source link

Packaged apps are really big #9

Open PragTob opened 10 years ago

PragTob commented 10 years ago

As reported on the shoes4 repo (shoes/shoes4#473) currently packaged standalone apps are way too big (> 200 MB) while we believe ~35MB /should/ be ok.

Suggestions are just using the JRE instead of the JDK (for instance)

This needs to be investigated and fixed.

janckerchen commented 10 years ago

(maybe I should post here)

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

Dig into mac standalone app, JDK is 104M image

PragTob commented 10 years ago

So as @wasnotrice noted:

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 :)

Also 75MB for nokogiri 1.6 baffles me, I think the gem itself is just 3 MB... maybe dependencies and dependencies of dependencies amount to that much?

Btw. don't we just use nokogiri to create the HTML manual on shoes4? Wouldn't that mean we could practically use as a development dependency.

jasonrclark commented 7 years ago

Current status on this after the latest packaging changes to use installed JDK and/or download... things appear to be down to about 65MB per package. This includes the Shoes gems, only the necessary dependencies currently.

There seems to be an additional copy of JRuby's jars at two spots in the resulting jar contributing an extra 21MB. That's worth looking into it.

shoes-manual also still depends on nokogiri which is at least 4MB to keep that to_html link. Really thinking about whacking it now and just leaving the generation code for dev-mode only.

swt has some support for things we don't use (like JFace) which tacks on a few extra meg.

Also, shoes-package and crew are probably only another 1MB or so, but we'll look at not including it unnecessarily with https://github.com/shoes/shoes4/issues/1401