Closed Bug 715047 Opened 14 years ago Closed 5 years ago

remove (or justify) dependency on external libraries

Categories

(Firefox for Android Graveyard :: Android Sync, defect, P5)

ARM
Android
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE
Future

People

(Reporter: blassey, Unassigned)

References

Details

+++ This bug was initially created as a clone of Bug #714874 +++
Blocks: 714874
No longer depends on: 714874
This is very unlikely to ever be RESOLVED FIXED. We might slim the set down, but it doesn't make sense to eliminate all dependencies. For example, to switch to the Android Commons Codec, would require us to maintain our own base32 code, because that version doesn't have it. And of course we use JSON extensively, so we'll someday switch to Jackson (Bug 709185)... but that's not removing a dependency, just changing it.
Summary: remove dependency on external libraries → remove (or justify) dependency on external libraries
I think this is a fine goal. We should probably file a bug covering what work we'd have to do to remove each library dependency, and evaluate each on time/quality cost vs. the download size hit we're paying. Is there a list of the set of libs we've picked up as dependencies?
(In reply to Mike Connor [:mconnor] from comment #2) > Is there a list of the set of libs we've picked up as dependencies? * httpclientandroidlib 1.0.1, including Apache HttpClient 4.1 * json-simple (to be replaced by Jackson as time permits: faster and streaming parsing) * commons-codec 1.5 It's also worth considering what the minification effort would be versus removing whole libraries. The set of classes that we could outright eliminate is probably sizable. Someone should also find out if dex already does this.
Target Milestone: --- → Future
The Sync feature code plus third-party libs added about 640 KB to the compressed .apk file (in the 12/22 nightly build). I am working to integrate the ProGuard class file shrinker/optimizer (bug 709230). ProGuard reduces the compressed .apk file by about 130 KB (so Sync's net increase would be about 510 KB before other size reduction efforts). Before Sync and third-party libs were added, ProGuard stripped out about 50 KB of dead code.
(In reply to Chris Peterson (:cpeterson) from comment #4) > I am working to integrate the ProGuard class file shrinker/optimizer (bug > 709230). Does ProGuard prune the class tree, or just shrink? (I could probably look this up for myself, but on train.) I see a bunch of "-keep" directives in android-sync's proguard.cfg, which implies that it does, but it might not have enough information to decide what to throw away…
ProGuard prunes dead code and inline some functions. The -keep directives are necessary for code invoked from "outside" our classes or from C++ JNI.
Priority: -- → P4
Product: Mozilla Services → Android Background Services
Depends on: 1204559
Product: Android Background Services → Firefox for Android
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195 Needinfo :susheel if you think this bug should be re-triaged.
Priority: P4 → P5
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.