Performance/Addons/BestPractices: Difference between revisions

Line 12: Line 12:
'''Instead of JS XPCOM services'''
'''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.
JavaScript code modules are singletons, are fastloaded, and don't require XPCOM like a full-blown JS XPCOM service does.
'''Avoid mozIJSSubScriptLoader'''
Scripts imported this way do not use fastload and are loaded and evaluated from the original source every time loadSubScript is called. Convert any uses to proper modules if possible.


==Memoization==
==Memoization==
190

edits