Closed Bug 200142 Opened 22 years ago Closed 19 years ago

perl tool to investigate package dependencies

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: sipaq, Assigned: holyspirit)

Details

Attachments

(3 files)

The goal of this bug is to cut down the guts of comm.jar. We need to know what can be safely removed and what can't. Then we have to find out where the things that can't be safely removed are referenced in the rest of Phoenix so that the necessary contents can be forked and comm.jar can be eliminated entirely. So far most of (if not all of) content/communicator/bookmarks content/communicator/history, content/communicator/pref and content/communicator/timebomb can be safely removed. There are also some other pref-files in other directories which can be removed. This should result in faster startup time, reduced memory and disk footprint and a smaller download file (approx. 180 KB). This bug blocks bug 171082. Some of the things done her are also discussed in this bug, but since bug 171082 is a tracking bug, I've filed a new bug.
Ok, so here is a list of stuff, which can be deleted from comm.jar (roughly tested under W2K). Any help and testing is greatly appreciated. How can you help: comm.jar in the chrome-directory is just a normal zip-archive. Open it and delete the files I mention here (always make a backup copy of comm.jar first). Then run Phoenix and test all the functionality (open all menus), browse a few webpages, etc. See if everything works, if not, come back here and tell me. all of content/communicator/bookmarks all of content/communicator/history all of content/communicator/pref all of content/communicator/related all of content/communicator/sidebar all of content/communicator/search all of content/communicator/timebomb all of content/navigator all of content/navigator-region all of content/navigator-platform in content/communicator - communicator.css
This 'bug' needs some revising, due to the new roadmap. All of the theme packaging needs to be changed: global & communicator (& editor) for the base (MRE?) browser (for Mozilla Browser = Phoenix) messenger (for Mozilla Messenger = ??)
Alfred: This bug is Phoenix-only and therefore browser-only. In Phoenix (with or without the new roadmap) we simply don't need all the messenger and editor stuff in comm.jar. Everything in communicator should be moved to browser or to global.
some interesting report: 1. It seems that viewsource is the largest consumer of chrome files in comm.jar (many) 2. bookmarksManager.xul needs too comm.jar file too. 3. page setup. 4. Character Encoding -> customize needs pref-charset.xul (i do not remember the exact file name) from comm.jar the test is done by removing comm.jar all together, and putting back necessary files so Phoenix will work. however, the test is still in progress
>some interesting report: > >[...] > >the test is done by removing comm.jar all together, and putting back necessary >files so Phoenix will work. > >however, the test is still in progress Chu Alan, anything new from your tests?
> Chu Alan, anything new from your tests? i am regreted to say that i have stopped testing because I need to take my A-Level public examination. Do you want me to restart the test or do you have another plan to do it in a more efficient way? :) since I am having my summer vocation, I should have plenty of free time available.
Attached file chrome-trace report
this report is generated by a little script I have written today, it is very coarse and the report is very loose and not quite accurate (some essential files are marked as dangling :)). However I do hope that it provides some useful information to others.
while working on the script, I have notices some problems: 1. in toolkit/jar.mn, checkbox.xml got packaged twice 2. there are many missing files got referenced (try to find 'not in chrome list' in the report), is there something missing in my script?
Sprite, three things: 1. To verify that your script does what it is intended to do, it would be helpful if you could post that script here as an attachment. 2. In your chrome-trace report many files .jars are mentioned, which are not supplied with Firebird in the default build. Could you restrict your trace just to comm.jar? 3. There is a similar bug to this one for classic.jar, a trace would be very helpful there also. It's bug 189043.
simon: 1. here it is :) i hope that it is doing the right thing, if not, feel free to point it out 2. can you supply me a list of directory which should be 'packaged'? (or i am thinking i should go through the actual packaged jar file instead of working on the tree itself) (btw i am still trying to refine the script, for example, showing inter-jar file dependency, but i am seeking for comments from others first) 3. oh... i haven't noticed it :) i will CC that bug too
Attachment #127430 - Attachment description: the script → the chrome-trace script
Attachment #127430 - Attachment mime type: application/octet-stream → text/plain
you have to change the INCLUDE_PATH in chrome-trace script to point to the directory which this template resides in sorry for the spam :)
> 1. here it is :) > i hope that it is doing the right thing, if not, feel free to point it out Since I'm no perl hacker, I won't be able to to do that, but perhaps other people can help. > 2. can you supply me a list of directory which should be 'packaged'? > (or i am thinking i should go through the actual packaged jar file instead > of working on the tree itself) The latter would be a good idea, but beware of possible inter-jar-dependencies. The easiest way (IMO) would be to unpack all the jars in the default build under a single directory (maintaining the sub-directory structure of every jar of course) and then let the script work from there.
> Since I'm no perl hacker, I won't be able to to do that, but perhaps other > people can help. know anybody who can take a look at my script? may be CC them to this bug?
Depends on: 215468
QA Contact: asa
Depends on: 193740
No longer depends on: 215468
Component: General → build-config
Bug 221602 covers this area more completely than this bugs and is actively being worked on. Marking duplicate. *** This bug has been marked as a duplicate of 221602 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Chu: this script has a really great potential! Thank you very much! However, it needs to be improved in order to be useful. - files should be ordered by jar then alphanumerically. - in order to figure out the dependency tree, we need to provide less information :-) it would be great to have a way to specify a package and the script would check the files that are not used inside itself only. That would already provide a good information. Could you run it for browser.jar and toolkit.jar? Also, it would be nice to select packages (like browser.jar) and see the dangling files of another package. Could you run it to see the dangling files in toolkit.jar wrt browser.jar?
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
-> Chu
Assignee: blake → holyspirit
Status: REOPENED → NEW
Summary: Debloat and purge comm.jar of cruft → perl tool to investigate package dependencies
pierre: i have a couple of assignments and midterms coming soon, i will come back to this when i am available. BTW i am studying in university now :)
No longer depends on: 193740
QA Contact: bugzilla
Hardware: PC → All
No longer blocks: reduce-binary-size
I guess we can call this FIXED now.
Status: NEW → RESOLVED
Closed: 21 years ago19 years ago
Resolution: --- → FIXED
QA Contact: bugzilla → build.config
Status: RESOLVED → VERIFIED
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: