Debloat and purge classic.jar of cruft

VERIFIED DUPLICATE of bug 243091

Status

()

Firefox
Build Config
VERIFIED DUPLICATE of bug 243091
16 years ago
13 years ago

People

(Reporter: David P James, Assigned: Jason Kersey)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments, 7 obsolete attachments)

(Reporter)

Description

16 years ago
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.

Comment 1

16 years ago
See also http://www.mozillazine.org/forums/viewtopic.php?t=4353

Comment 2

16 years ago
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.
(Reporter)

Comment 3

16 years ago
Created attachment 111736 [details]
purged files and directories

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.

Comment 4

16 years ago
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.
(Reporter)

Comment 5

16 years ago
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.

Comment 6

16 years ago
> This probably should be reassigned to kerz.

Ok -> kerz

Jason, can you please take a look at this.
Assignee: blaker → kerz

Comment 7

16 years ago
Linux seems to require a few more things than Windows.

Comment 8

16 years ago
Depends on Bug 174146

Updated

16 years ago
Depends on: 174146

Updated

16 years ago
Blocks: 197260

Updated

16 years ago
Blocks: 171082

Updated

16 years ago
Attachment #111736 - Attachment is obsolete: true

Comment 9

16 years ago
Created attachment 119287 [details]
Obsolete files in classic.jar (tested on Windows 2000)

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.
(Reporter)

Comment 10

16 years ago
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.

Updated

16 years ago
Attachment #119287 - Attachment is obsolete: true
Created attachment 119649 [details]
Obsolete files in classic.jar - version 2.0

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>

Updated

15 years ago
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.

Updated

15 years ago
Attachment #119649 - Attachment is obsolete: true
Created attachment 126285 [details]
Obsolete files in classic.jar - version 3

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.
Created attachment 126286 [details]
Obsolete files in classic.jar - version 3.01

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
Created attachment 127799 [details] [diff] [review]
Let's get rid of some files

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)
Created attachment 127806 [details] [diff] [review]
Correct patch

Fixing small typo.
Attachment #127799 - Attachment is obsolete: true

Comment 19

15 years ago
Comment on attachment 127806 [details] [diff] [review]
Correct patch

Moving Review request as I guess Simon missed it....
Attachment #127806 - Flags: review?(kerz)
(Assignee)

Comment 20

15 years ago
I'll take a look at this soon.
Status: NEW → ASSIGNED

Updated

15 years ago
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

Comment 22

15 years ago
Could classic.jar also be renamed to qute.jar (the same way as in Thunderbird)?

Comment 23

15 years ago
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.

Updated

15 years ago
Component: General → build-config
Created attachment 137278 [details] [diff] [review]
Freed from bitrot

Patch de-bitrotted
Attachment #127806 - Attachment is obsolete: true

Comment 25

15 years ago
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.  

Created attachment 137279 [details] [diff] [review]
Better patch (after talking with pch)

Better patch after pch's instructions from IRC.
Attachment #137278 - Attachment is obsolete: true

Updated

15 years ago
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.

Comment 29

15 years ago
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 31

15 years ago
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?

Comment 33

15 years ago
 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
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 35

14 years ago
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

Updated

13 years ago
QA Contact: bugzilla → build.config
You need to log in before you can comment on or make changes to this bug.