Open Bug 1044079 Opened 6 years ago Updated 2 years ago
[meta] Eliminate unnecessary desktop/toolkit resources from Fennec's omni
Wes noticed in Bug 1044067 that desktop-only resources are ending up in our APK. This meta bug tracks fixing any of those that we find. It would probably be worthwhile to skim through omni.ja, saying "hey, what's that doing there?".
Candidates, from a few minutes with ls -lRsa $(find . -type f): modules/devtools in general is 3.2MB. 90KB: modules/devtools/jsbeautify/beautify-tests.js 60KB: modules/devtools/jsbeautify/beautify-js.js Why so much XUL stuff? 60KB: chrome/toolkit/content/global/bindings/autocomplete.xml Looks like B2G stuff: 55KB: modules/PhoneNumberMetaData.jsm 53KB: modules/ContactDB.jsm Why is our XML not minified? chrome/toolkit/content/mozapps/extensions/extensions.xml is full of comments and whitespace: <!-- Rating - displays current/average rating, allows setting user rating --> <binding id="rating"> <content> modules/services-common/storageservice.js -- this is a Sync client module. What's this doing in our omni.ja? 115KB for a QR code decoder. The least-minified code in the whole world. modules/devtools/qrcode/decoder/index.js
most of the code in modules/devtools (toolkit/devtools) is required.
Depends on: 1044108
Here's a very rough list of omnijar files from Nightly that we *don't* use during test runs. In other words, if we take out these files, all tests should still pass. #1 in the list, chrome/shumway/content/shumway.js, is not shipped in releases. #2, modules/commonjs/dev/volcan.js, was added only a week ago. It appears unused but I don't know if there are plans to use it in the future.
I'm not sure if this fits in here but I noticed that PluginProvider.jsm and OpenH264Provider.jsm are loaded into Fennec, but probably are not needed. Looks like they are loaded via a manifest component category: http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/extensions.manifest#16 The file already has a MOZ_WIDGET_GONK wrapper. Maybe we could add a nested wrapper around those two lines? I spotted them when looking at AWSY.com, just looking at what files are in memory after startup.
Taking a fresh look today: chrome/en-US/locale/en-US/global-platform/unix/ chrome/en-US/locale/en-US/global-platform/mac/ chrome/en-US/locale/en-US/global-platform/win/ chrome/en-US/locale/en-US/browser/localepicker.properties chrome/en-US/locale/en-US/global/printPreview.dtd chrome/toolkit/skin/classic/global/icons/question-24.png and friends chrome/pippki/content/pippki/protectedAuth.js chrome/pippki/content/pippki/protectedAuth.xul chrome/pippki/content/pippki/resetpassword.js chrome/pippki/content/pippki/resetpassword.xul chrome/pippki/content/pippki/setp12password.xul and friends
You need to log in before you can comment on or make changes to this bug.