[Project_owners] Anyone interested? Extension Minimizer Tool

Eric H. Jung eric.jung at yahoo.com
Fri May 16 14:12:46 PDT 2008


If anyone else is interested in a tool like this, please reply here or at https://www.mozdev.org/bugs/show_bug.cgi?id=19120


I'd like to request a new mozilla-specific tool for mozdev. 

The tool would do the following:

0. User uploads XPI to a page.
1. Tool determines if the XPI defines DTD entities that aren't used.
2. Tool determines if the XPI defines properties that aren't used.

Results are reported back to the user. An advanced version might offer the XPI,
stripped of unused entities and properties (i.e. "minified") to the user for
download. The advanced version might also have options to strip CSS, XUL, and
JS of extra whitespace, although I don't imagine many extension authors would
use that.

Why is this important? Addons that have many localizations tend to build up
lots of "string" cruft over time. Some entities and properties are no longer
used, but they still exist in various DTD and property files. This can inflate
XPI size needlessly, especially when there are a lot of localizations.

Manually searching for entities and properties not in use can be extremely
labor-intensive when there are hundreds or thousands of them.

To simply implementation, the tool could ignore DTDs defined in XUL files (at
least for an initial implementation) and instead just parse *.dtd and
*.property files.
Eric


      


More information about the Project_owners mailing list