Closed Bug 189043 Opened 22 years ago Closed 21 years ago

Debloat and purge classic.jar of cruft

Categories

(Firefox Build System :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 243091

People

(Reporter: davidpjames, Assigned: kerz)

References

()

Details

Attachments

(2 files, 7 obsolete files)

The goal of this bug is to cut down the guts of classic.jar so that it contains only the browser/* and global/* directories. editor/* and messenger/* can apparently already be removed without much fuss, but eliminating communicator/* and navigator/* are going to be a bit more challenging. 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 of communicator/* and navigator/* can be moved into browser/* and global/*, and what should be moved where. Patches are more than welcome.
As I already said in the mozzine forum. I would gladly provide a patch, if someone could direct me to the relevant files. So far I've only found mozilla/browser/base/jar.mn and mozilla/toolkit/skin/win/jar.mn but these don't mention the bloat files at all. Nonetheless here is my (surely very incomplete and faulty) list of what can be left out: All of skin\classic\editor All of skin\classic\messenger All of skin\classic\navigator except pageinfo.css All of skin\classic\global\console All of skin\classic\global\splitter All of skin\classic\communicator\taskbar All of skin\classic\communicator\profile All of skin\classic\communicator\cookie All of skin\classic\communicator\brand All of skin\classic\communicator\bookmarks All gifs in skin\classic\global\icons In skin\classic\global\menu: menu-arrow-disabled.gif menu-arrow-hover.gif menu-arrow.gif In skin\classic\global: preview.gif In skin\classic\communicator\icons: btn1.gif lock-broken.gif lock-insecure.gif lock-secure.gif offline.gif online.gif search-act.gif search-hov.gif search.gif turbo-systray.gif Since I'm running Windows, I would be grateful if someone could test this under Linux. It is possible that there are more redundancies, especially in the many css-files. I only mentioned files, which I strongly believe to be redundant. But anybody who wants to experiment should do so and post his results here.
Attached file purged files and directories (obsolete) (deleted) —
This is a tentative list of files and directories that can be safely purged, with a caveat; -close-button.gif is still needed until the sidebar close button is reskinned.
As far as I can see, all the redundant files are packaged in mozilla/themes/classic/jar.mn IMO a fork should be considered here. Another question: Shouldn't this bug better be assigned to kerz or ben? Kerz did the move over to Qute. Ben has done a lot of work on the above mentioned file and should be familiar with the problem.
This probably should be reassigned to kerz. The above "purged files and directories" includes navigator/navigator.css, which can't be removed without breaking View Page Source. However, that file can itself be stripped down quite significantly.
> This probably should be reassigned to kerz. Ok -> kerz Jason, can you please take a look at this.
Assignee: blaker → kerz
Linux seems to require a few more things than Windows.
Depends on Bug 174146
Depends on: 174146
Blocks: 197260
Blocks: 171082
Attachment #111736 - Attachment is obsolete: true
I've marked David's list obsolete. Here's a new and thoroughly tested list with all the files in classic.jar, which can be deleted or reduced. This is Windows-only. If someone could test this on Linux and give feedback, that would be deeply appreciated. Patches for the trimmed-down css-files will follow shortly.
Are you sure about navigator.css? - try View Page Source with it removed (comment #5). I'll look into the rest when I have some more time.
I have no problems with "View Page Source" with navigator.css removed.
Attachment #119287 - Attachment is obsolete: true
Attached file Obsolete files in classic.jar - version 2.0 (obsolete) (deleted) —
Found some more stuff, which I believe to be obsolete, at least on Windows. Of course any help and testing on this is greatly appreciated. If you don't know how to help, see <a href="http://www.mozillazine.org/forums/viewtopic.php?t=8173">this entry in the mozillazine forums</a>
No longer blocks: 197260
hm.. why do we still need pageInfo.css? This seams to be covered by something else, or? skin/classic/communicator/search and skin/classic/communicator/directory look also dead for me. skin/classic/browser/pref/pref.css has to be adjusted, because the Qute-Screenshot has different height and width << there is no preview reference.
Attachment #119649 - Attachment is obsolete: true
Attached file Obsolete files in classic.jar - version 3 (obsolete) (deleted) —
Updated list of obsolete files. I added the communicator/directory and communicator/search directories to the list of obsolete files, edited the entry for the theme preview (we now only kill preview.gif) and cut out more in the css files. As always, please test this on Windows as well as on other platforms. On this system this brings a 140kb download reduction, better startup performance and a slightly lower memory consumption.
Screw me, we still need some stuff out of navigator/icons (in the long run this should be be forked and go into browser).
Attachment #126285 - Attachment is obsolete: true
Attached patch Let's get rid of some files (obsolete) (deleted) — Splinter Review
Let's get rid of insecure.gif, lock-mixed.gif, toolbar.gif and slider.gif
Comment on attachment 127799 [details] [diff] [review] Let's get rid of some files Kerz, can you take a look at this and check it in, if you like it.
Attachment #127799 - Flags: review?(kerz)
Attached patch Correct patch (obsolete) (deleted) — Splinter Review
Fixing small typo.
Attachment #127799 - Attachment is obsolete: true
Comment on attachment 127806 [details] [diff] [review] Correct patch Moving Review request as I guess Simon missed it....
Attachment #127806 - Flags: review?(kerz)
I'll take a look at this soon.
Status: NEW → ASSIGNED
Attachment #127799 - Flags: review?(kerz)
Think we should move along the path that bug 213228 proposes: 1. Take a look at all the files we don't need from mozilla/themes/classic/ (This has already been done, but further testing would be a good thing) 2. Take a look at the rest of the files and move them over to the following directories if necessary: - mozilla/browser/base/skin - mozilla/browser/components/downloads/skin - mozilla/browser/components/bookmarks/skin - mozilla/browser/components/prefwindow/skin 3. Remove all the unused files in mozilla/browser. mozilla/browser/components/search comes to my mind here. I'm taking over QA Contact, since this essentially my personal pet bug :-) Oh and Kerz, I really think this should go in before 1.0, but I leave the choice up to you of course.
QA Contact: asa → bugzilla
Could classic.jar also be renamed to qute.jar (the same way as in Thunderbird)?
Renaming classic.jar to anything else will cause a number of extensions and add-on apps to break since many rely on the "classic" jar file for their default theme look. That's not to say it shouldn't be done but, if so, I would think it would make more sense naming it default1.jar, or something generic like that? That way, it wouldn't be tied to a particular theme name.
Component: General → build-config
Attached patch Freed from bitrot (obsolete) (deleted) — Splinter Review
Patch de-bitrotted
Attachment #127806 - Attachment is obsolete: true
Simon- If you're just removing cruft, why do I see so many plus signs in there? Also, this makes it sound like the default theme has no lock-insecure.gif and lock-mixed.gif. Heck, I'm not sure about the other 2 files this patch removes, either.
Better patch after pch's instructions from IRC.
Attachment #137278 - Attachment is obsolete: true
Attachment #127806 - Flags: review?(kerz)
Comment on attachment 137279 [details] [diff] [review] Better patch (after talking with pch) Pierre, do you like that?
Attachment #137279 - Flags: review?(p_ch)
>If you're just removing cruft, why do I see so many plus signs in there? These plus signs are for the XUL preprocessor. They have nothing to do with the cleanup action. >Also, this makes it sound like the default theme has no lock-insecure.gif and >lock-mixed.gif. Heck, I'm not sure about the other 2 files this patch removes, >either. We already have a better alternative for lock-insecure.gif, which is security-broken.png and lock-mixed.gif isn't used throughout the tree. Doing a textsearch with lxr only gives me three results, all of them jar-files.
So what icon do we use when there is a mixture of content? I see what you mean about the XUL preprocessor. How long has scrollbar/slider.gif been broken? Is win/jar.mn the only one that has that wrong, or do the other platforms, too?
>So what icon do we use when there is a mixture of content? I don't know. Either no icon at all, the secure icon or the insecure icon. But definitely not some old and crufty icon from the classic theme. >How long has scrollbar/slider.gif been broken? At least since the early phoenix 0.1 days. >Is win/jar.mn the only one that has that wrong, or do the other platforms, too? Only windows
Comment on attachment 137279 [details] [diff] [review] Better patch (after talking with pch) checked in. (and removing toolbar.gif)
Attachment #137279 - Flags: review?(p_ch) → review+
Simon, is this still ongoing?
i don't think this one is done yet.
This is now covered by bug 243091. Hooray for people opening new bugs instead of using existing ones :-( *** This bug has been marked as a duplicate of 243091 ***
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
I'll say. You'd think that removing cruft was a new idea... heck, the new bug even has a nearly identical name. Sigh v.
Status: RESOLVED → VERIFIED
QA Contact: bugzilla → build.config
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

Creator:
Created:
Updated:
Size: