Nglayout.debug.disable xul cache
Contents
Background
To improve performance, Mozilla caches chrome XUL documents the first time they load for faster loading later. The effect is that the source XML file is not read and re-parsed each time the chrome in question is displayed. The XUL cache is serialized and saved between Mozilla sessions in the XUL FastLoad file, which saves a “compiled” version of the XUL and JavaScript in a document to disk for faster startup the next time the application runs.
During development of XUL applications, it’s convenient to disable the XUL cache so that changes you make to files on disk take effect the next time the window or dialog is loaded (instead of the next time Mozilla starts).
Possible values and their effects
True
Do not cache parsed XUL documents and do not save the cache to the XUL FastLoad file on exit; re-read the source files each time the window or dialog needs to be displayed.
False
Cache XUL documents in memory and save the cache to disk on exit to improve performance. (Default)
Caveats
- There is (unsurprisingly) a performance hit associated with setting this preference to true.
-
A bug with Firefox on the Mac may cause 100% CPU usage when this preference is true. - The XUL cache works without XUL FastLoad on, but the cache will not be saved between Mozilla sessions.
- Conversely, XUL FastLoad works without the XUL cache enabled, but its effects are limited to JavaScript.
Recommended settings
In general, the only time it’s useful to set this preference to true is during extension development, modification of chrome files, or developing other XUL applications in a flat-chrome environment.
First checked in
Has an effect in
- Mozilla Suite (all versions since M12)
- Mozilla Firefox (all versions)
- Mozilla Thunderbird (all versions)
- SeaMonkey (all versions)
Related bugs
- Bug 15146 - [perf] use prototypes to improve 2nd window performance
- Bug 357852 - nglayout.debug.disable_xul_cache causes Firefox to use 100% of the CPU