We had our first MemShrink meeting a week ago. Here’s some progress that’s been made since then. Please note that this is a list of things that caught my eye, and isn’t meant to be exhaustive in any way.
Two big improvements were made to garbage collection trigger heuristics.
- Gregor Wagner added a time-based trigger to the garbage collector. Most notably, this should prevent slow build-ups of garbage when the browser is left idle but an open website is doing a small amount of continual work (eg. updates on a news site). We’ve had a lot of reports about this problem, so this will hopefully be a big win. Thanks, Gregor! Note that if the browser is truly idle it won’t trigger, so it shouldn’t cause power problems with Firefox mobile. See this comment for full details of the new trigger.
- Luke Wagner (no relation to Gregor!) fixed a gap in the garbage collector’s allocation-based triggers — certain string allocations weren’t being counted by the garbage collector, which meant it allowed them to build up excessively. This fix particularly helps with complex regular expression operations.
Two improvements were made to the coverage of about:memory, thus reducing the amount of memory falling into the “heap-unclassified” bucket.
- I added three new memory reporters: explicit/js/scripts, explicit/js/object-slots, explicit/js/string-chars. When I open Gmail, these three together account for 11% of the explicit allocations.
- Kyle Huey added a new memory reporter called xpti-working-set, which measures memory used by the XPCOM typelib system. This is usually a bit over 1MB of memory.
Finally, I made progress on reducing unnecessary compartment overhead, which I described previously.