Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upandroid: why is the binary that large (200Mb and 600Mb) #18625
Comments
paulrouget
commented
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. |
|
Hmm, apparently, bloaty doesn't work on a ELF binary from a MacOS. |
|
My bad. It's working. |
|
|
Looks like a large part of this is debug info. @paulrouget Is this in release mode? |
|
@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 |
|
This isn’t specific to Android, I get similar results for 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 |
|
|
This makes developing on Android especially difficult. Pushing 200M every time is slow. |
|
Using NDK's |
|
I just checked, |
|
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 |
I'm not sure to understand where stripping happens there. |
|
It also works to use NDK's |
|
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? |
|
If this is not Android-specific, maybe we could close this issue in favour of #14176? |
|
It is absolutely Android specific. |
|
This will be addressed by #20912. gradle strips .so. |
…sapin Revisit how the Android port works. Fix #20855 Fix #18625 Fix #21147 Before polishing and making sure everything works fine (like the VR code, the android-x86 version, the non-android version of the lib, …), I'd like to get some early feedback on the approach. I recommend reviewing commit by commit. To test, just follow the regular steps: ``` ./mach build -d --android ./mach package --dev --android builds servo.apk ./mach install --dev --android && ./mach run --android ``` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20912) <!-- Reviewable:end -->
…sapin Revisit how the Android port works. Fix #20855 Fix #18625 Fix #21147 Before polishing and making sure everything works fine (like the VR code, the android-x86 version, the non-android version of the lib, …), I'd like to get some early feedback on the approach. I recommend reviewing commit by commit. To test, just follow the regular steps: ``` ./mach build -d --android ./mach package --dev --android builds servo.apk ./mach install --dev --android && ./mach run --android ``` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20912) <!-- Reviewable:end -->
…sapin Revisit how the Android port works. Fix #20855 Fix #18625 Fix #21147 Before polishing and making sure everything works fine (like the VR code, the android-x86 version, the non-android version of the lib, …), I'd like to get some early feedback on the approach. I recommend reviewing commit by commit. To test, just follow the regular steps: ``` ./mach build -d --android ./mach package --dev --android builds servo.apk ./mach install --dev --android && ./mach run --android ``` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20912) <!-- Reviewable:end -->
…sapin Revisit how the Android port works. Fix #20855 Fix #18625 Fix #21147 Before polishing and making sure everything works fine (like the VR code, the android-x86 version, the non-android version of the lib, …), I'd like to get some early feedback on the approach. I recommend reviewing commit by commit. To test, just follow the regular steps: ``` ./mach build -d --android ./mach package --dev --android builds servo.apk ./mach install --dev --android && ./mach run --android ``` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20912) <!-- Reviewable:end -->
…sapin Revisit how the Android port works. Fix #20855 Fix #18625 Fix #21147 Before polishing and making sure everything works fine (like the VR code, the android-x86 version, the non-android version of the lib, …), I'd like to get some early feedback on the approach. I recommend reviewing commit by commit. To test, just follow the regular steps: ``` ./mach build -d --android ./mach package --dev --android builds servo.apk ./mach install --dev --android && ./mach run --android ``` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20912) <!-- Reviewable:end -->
…sapin Revisit how the Android port works. Fix #20855 Fix #18625 Fix #21147 Before polishing and making sure everything works fine (like the VR code, the android-x86 version, the non-android version of the lib, …), I'd like to get some early feedback on the approach. I recommend reviewing commit by commit. To test, just follow the regular steps: ``` ./mach build -d --android ./mach package --dev --android builds servo.apk ./mach install --dev --android && ./mach run --android ``` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20912) <!-- Reviewable:end -->
…sapin Revisit how the Android port works. Fix #20855 Fix #18625 Fix #21147 Before polishing and making sure everything works fine (like the VR code, the android-x86 version, the non-android version of the lib, …), I'd like to get some early feedback on the approach. I recommend reviewing commit by commit. To test, just follow the regular steps: ``` ./mach build -d --android ./mach package --dev --android builds servo.apk ./mach install --dev --android && ./mach run --android ``` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20912) <!-- Reviewable:end -->
…sapin Revisit how the Android port works. Fix #20855 Fix #18625 Fix #21147 Before polishing and making sure everything works fine (like the VR code, the android-x86 version, the non-android version of the lib, …), I'd like to get some early feedback on the approach. I recommend reviewing commit by commit. To test, just follow the regular steps: ``` ./mach build -d --android ./mach package --dev --android builds servo.apk ./mach install --dev --android && ./mach run --android ``` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20912) <!-- Reviewable:end -->