Performance/Addons/BestPractices: Difference between revisions
< Performance | Addons
Jump to navigation
Jump to search
No edit summary |
|||
| Line 22: | Line 22: | ||
* Combine CSS | * Combine CSS | ||
* Combine pref files | * Combine pref files | ||
* Combine xpt files | * Combine interfaces into a single .idl to reduce xpt files | ||
==Asynchronous I/O== | ==Asynchronous I/O== | ||
Revision as of 01:47, 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 interfaces into a single .idl to reduce xpt files