ExtremeTech – Mozilla puts Firefox on a memory diet

Firefox’s single largest consumer of RAM, its JavaScript engine SpiderMonkey, is going on the mother of all diets. At any one time, SpiderMonkey’s memory footprint can be over 50% of Firefox’s total usage — the JavaScript on the ExtremeTech homepage, for example, uses no less than 115MB of memory — and slipstreaming SpiderMonkey is by far the best change that Mozilla can make to keep Firefox on the desktop svelte and competitive with Chrome and IE, and Firefox on Android less sluggish.

If you’re not a programmer, you should probably skip this paragraph. Basically, almost every fundamental part of SpiderMonkey is being torn apart, turned over in the hands of Mozilla’s finest engineers, and rejigged to use less memory. JSObject is being cut in half, and thus JSFunction will also be slimmed down. Slots arrays will have the option of being 32-bit, rather than being forcibly being constructed of 64-bit “fatvals.” Shapes, one of SpiderMonkey’s most important data structures, are going to be almost halved in size. Mozilla is currently looking into whether scripts can be “lazily loaded,” too — as much as 70-80% of all downloaded JavaScript is never executed, and so it makes no sense to load it into memory; lazy loading, where scripts are loaded as-needed, would significantly reduce memory usage.

via ExtremeTech – Mozilla puts Firefox on a memory diet. I still use Firefox as my main browser but this is a needed improvement. Hopefully, Mozilla is successful with their improvement.


Posted

in

,

by