Closed Bug 1486524 Opened 6 years ago Closed 6 years ago

End xz compression of libxul and friends

Categories

(GeckoView :: General, enhancement, P1)

59 Branch
enhancement

Tracking

(geckoview64 wontfix, firefox64 wontfix, firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
geckoview64 --- wontfix
firefox64 --- wontfix
firefox65 --- fixed

People

(Reporter: snorp, Assigned: snorp)

References

Details

Attachments

(1 file, 1 obsolete file)

Bug 1485045 wants to produce a "fat" AAR, which includes all supported architectures in one package. We would then rely on downstream tools to split appropriately. Those tools don't understand our placing of libraries in assets/, so we need to stop that.
I have a patch for this. https://treeherder.mozilla.org/#/jobs?repo=try&revision=3850f337ca74ae6fdb650345929c469f180c43ad&selectedJob=196173917 Fennec APK size appears to go from 33.5MB to 41.6MB. Is this an acceptable change?
Flags: needinfo?(s.kaspari)
Flags: needinfo?(bbermes)
Is this all or nothing? Does this mean we can't have the multiarch-GeckoView-AAR without disabling this for Fennec too?
It's hard to make a call without knowing the results of "Android App Bundles" and "Dynamic Delivery". However I tend to not blocking ourselves on Fennec given that Fennec's fate is sealed.
Flags: needinfo?(s.kaspari) → needinfo?(snorp)
Assignee: nobody → snorp
Flags: needinfo?(snorp)
(In reply to Sebastian Kaspari (:sebastian) from comment #2) > Is this all or nothing? Does this mean we can't have the > multiarch-GeckoView-AAR without disabling this for Fennec too? I think it'll be a PITA, but could be doable. I think it depends on how much we think that size savings has helped Fennec.
It turns out we've probably been getting lucky loading libraries in GeckoView this whole time. The XZ libs are compressed with deflate in the AAR, and that has been getting carried over into the app APK. Apparently it works most of the time because we're unable to actually deflate xz-compressed data. According to the docs, we should be able to specify that these files are not compressed[0], but it doesn't actually work. Further, even if it did work, it's not clear to me that the final APK would carry over the decisions made in the AAR. Apps can work around this by including the following block in the `android` section: aaptOptions { noCompress 'so' } This is not an acceptable long-term solution. [0] https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.AaptOptions.html#com.android.build.gradle.internal.dsl.AaptOptions:noCompress
Moving to GeckoView so we prioritize it appropriately.
Component: General → GeckoView
This also uses idiomatic packaging of the native libraries, which will allow easier downstream consumption of GeckoView.
This allows us to use the same Java code for any native platform, enabling a "fat" AAR. Depends on D10775
Priority: -- → P1
Attachment #9022314 - Attachment is obsolete: true
Pushed by jwillcox@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2bc6db0a2574 Don't use XZ compression for libs on Android r=glandium,nalexander
Backout by apavel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4e1b2b7e0c37 Backed out changeset 2bc6db0a2574 android raptor failures ona CLOSED TREE
Flags: needinfo?(snorp)
Summary: Consider ending xz compression of libxul and friends → End xz compression of libxul and friends
Pushed by jwillcox@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1e076b0054cc Don't use XZ compression for libs on Android r=glandium,nalexander
64=wontfix because we won't want to uplift this compression change to Beta.
Pushed by nalexander@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9823c01c5580 Don't use XZ compression for libs on Android r=glandium,nalexander
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Flags: needinfo?(snorp)
status-geckoview64=wontfix
Product: Firefox for Android → GeckoView
Version: Firefox 59 → 59 Branch
Target Milestone: Firefox 65 → mozilla65
Flags: needinfo?(bbermes)
Blocks: 1648654
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: