Closed Bug 309418 Opened 19 years ago Closed 11 years ago

Switch license blocks from CSS/JS/XUL-style comments to preprocessor-style comments to reduce build size

Categories

(Firefox :: General, defect)

x86
All
defect
Not set
minor

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jason.barnabe, Unassigned)

References

Details

(Keywords: memory-footprint)

Some Javascript/XUL files in the tree, like browser.js, use preprocessor-style
comments for the license block. Others, like nsSetDefaultBrowser.js, use their
respective language's commenting for the licence block. The licence block takes
about 1.7KB of space in the jar files when not preprocessed. If we switch all
the license blocks to be pre-processed, we would save

*.js: 34 files, ~59KB
*.xul, *.xhtml, *.dtd, *.rdf: 25 files, ~43KB
*.css (Winstripe skin): 32 files, ~55KB

for a total of ~157KB off the build size.

If this change is desired, I'd be happy to make the patches.
Related to bug 279698?
Indeed, that's the same issue, but that seems to only cover 10 Javascript files
instead of all the files I listed. I'd be fine with morphing this bug into "all
files except JS", if necessary.
Blocks: 171082
Status: UNCONFIRMED → NEW
Ever confirmed: true
Do the licenses have to be in every single file? Can there just be one file and in each file just have a link to the license file? like say, "This file is governed under the MPL 1.1/GPL 2.0/LGPL 2.1 tri-license. For more information please read /license.txt." That would save at least hundreds of kb's of code size.
Keywords: footprint
Assignee: jason.barnabe → nobody
Our new license headers are small enough that this isn't worth the trouble (and build-time hit of running the preprocessor on everything).
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.