Performance/Addons/BestPractices: Difference between revisions
< Performance | Addons
Jump to navigation
Jump to search
(Created page with '{{draft}} A list of recommendations for add-on authors to help keep Firefox fast and responsive. ==Use JavaScript Modules== '''Instead of the <script> tag in overlays''' JavaS…') |
No edit summary |
||
Line 2: | Line 2: | ||
A list of recommendations for add-on authors to help keep Firefox fast and responsive. | A list of recommendations for add-on authors to help keep Firefox fast and responsive. | ||
Once it matures, we'll move it over to MDC. Please contribute your tips! | |||
==Use JavaScript Modules== | ==Use JavaScript Modules== |
Revision as of 01:09, 17 March 2010
A list of recommendations for add-on authors to help keep Firefox fast and responsive.
Once it matures, we'll move it over to MDC. Please contribute your tips!
Use JavaScript Modules
Instead of the <script> tag in overlays JavaScript that is loaded via the script tag can slow window load. If your script is not needed as part of window setup, and doesn't need to be loaded for each individual window, then load it on-demand as a module.
Instead of JS XPCOM services JavaScript code modules are singletons, are fastloaded, and don't require XPCOM like a full-blown JS XPCOM service does.
Memoization
Lazily Load Services
Reduce File I/O
- Use JARs!
- Combine CSS
- Combine pref files
- Combine xpt files