You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
android: why is the binary that large (200Mb and 600Mb) #18625
@paulrouget's numbers from bloaty and the numbers cited in the initial report for release-mode match up, so I'd say yes.
What does bloaty -d symbols -n 100 libservo.so say? That would at least help identify the largest functions/objects. 36M+ of .text is almost as much as Firefox for Android's libxul.so... Nearly 10M of .data also seems a bit outlandish.
I just checked, -g is not passed to rustc in release mode. So I suspect this debug info is from C/C++ code like SpiderMonkey. We’ll need to dig into respective build systems and build.rs scripts to configure that.
Activity
emilio commentedon Sep 25, 2017
I guess the easiest would be to check it with bloaty or other tool like that to see what the size ends up being.
paulrouget commentedon Sep 25, 2017
Hmm, apparently, bloaty doesn't work on a ELF binary from a MacOS.
paulrouget commentedon Sep 25, 2017
My bad. It's working.
paulrouget commentedon Sep 25, 2017
SimonSapin commentedon Sep 25, 2017
Looks like a large part of this is debug info. @paulrouget Is this in release mode?
froydnj commentedon Sep 25, 2017
@paulrouget's numbers from bloaty and the numbers cited in the initial report for release-mode match up, so I'd say yes.
What does
bloaty -d symbols -n 100 libservo.sosay? That would at least help identify the largest functions/objects. 36M+ of.textis almost as much as Firefox for Android'slibxul.so... Nearly 10M of.dataalso seems a bit outlandish.SimonSapin commentedon Sep 25, 2017
This isn’t specific to Android, I get similar results for
target/release/servoon Linux x64.It looks like more than half the size is debug info, but I don’t understand why that’s included. http://doc.crates.io/manifest.html#the-profile-sections says that the default value for
profile.release.debugisfalse, and I don’t see anything that changes it. We also have adebug-mozjsconfig that also defaults to false.paulrouget commentedon Sep 25, 2017
paulrouget commentedon Sep 26, 2017
This makes developing on Android especially difficult. Pushing 200M every time is slow.
paulrouget commentedon Sep 29, 2017
@MortimerGoro: http://logs.glob.uno/?c=mozilla%23servo&s=25+Sep+2017&e=28+Sep+2017&b=1#c758686
paulrouget commentedon Sep 29, 2017
Using NDK's
strip, it gets reduced to 23Mb.SimonSapin commentedon Sep 29, 2017
I just checked,
-gis not passed to rustc in release mode. So I suspect this debug info is from C/C++ code like SpiderMonkey. We’ll need to dig into respective build systems andbuild.rsscripts to configure that.MortimerGoro commentedon Sep 30, 2017
I added this NDK step to servo in order to strip the size of the so and include the correct c++_shared library for the selected android architecture https://github.com/servo/servo/tree/master/support/android/apk/jni
paulrouget commentedon Sep 30, 2017
I'm not sure to understand where stripping happens there.
MortimerGoro commentedon Sep 30, 2017
I'm not sure to understand where stripping happens there.ndk-build automatically strips debug symbols when it copies .so from obj to lib folder.
It also works to use NDK's
strip, as you mentioned.paulrouget commentedon Sep 30, 2017
Understood. I don't use ndk-build (I don't use Servo's APK). That's why I'm having an issue.
Would it make sense to strip from our build system?
nox commentedon Oct 7, 2017
If this is not Android-specific, maybe we could close this issue in favour of #14176?
jdm commentedon Oct 7, 2017
It is absolutely Android specific.
paulrouget commentedon Jul 20, 2018
This will be addressed by #20912. gradle strips .so.
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…
Auto merge of #20912 - paulrouget:androidv2, r=jdm,mortimergoro,simon…