Firefox addons seem unfortunately prone to memory leaks

March 6, 2016

As is now traditional, I'll start with my tweets:

I look forward to a hypothetical day when it's difficult for Firefox extensions to leak memory like sieves. That day is not today.
It's depressing that at least half the time I audition new Firefox extensions, they immediately cause my session to bloat up madly.

It's like clockwork by now; I'll decide to try out a new extension (this time around I believe it was Cookie Monster), and at most a few hours later I'll see that my Firefox has monstered out into high and steadily growing memory usage. So much for that extension.

I have to assume that this is not a universal experience with Firefox addons, especially popular ones like Greasemonkey and Stylish. Clearly there's something unusual about either how I use Firefox or how my collection of addons interact with each other that makes me especially prone to it. I don't think it's just leaving Firefox running with pages open, because I'm sure that at least some people these days leave tabs permanently open on GMail or Twitter or Slack or Facebook or any number of other 'constant on' sites. Perhaps it's my use of windows over tabs, or combining multiple windows with some having tabs, but even that feels stretched.

(I don't think it's using Firefox Nightly either; I've tried out extensions in a stock Firefox and observed bloat symptoms there if I push it.)

It would be nice if Firefox Electrolysis would fix this, because then I'd really get something for the problems it's going to bring. But I don't actually believe that that's going to happen, and in fact I expect e10s to make my situation worse, because it'll undoubtedly cause me to have to change some extensions (and thus hunt for ones that not only work but don't leak).

(It's possible that e10s could help here. Given the pervasiveness of addon memory leaks, there are clearly Firefox addon APIs that are hard to use without leaking memory. If e10s replaced them with more leak-free APIs, we could win. But I don't really expect this because I don't think this is a core part of Electrolysis's purpose.)

Incidentally, this is one reason I am so grumpy when Firefox does something that breaks one or more of my extensions. My current set of extensions is extremely carefully chosen to not just work but also to not leak memory. Finding replacements with both attributes is both a bunch of work and also not in any way guaranteed. I've certainly had to drop addons in the past when they leaked and there was no non-leaking replacement.

(I suppose for big addons like Greasemonkey I should try to find their bug reporting system and report the issue, just on the odd chance that this gets things fixed. But making bug reports is exhausting.)

Written on 06 March 2016.
« What happens when a modern Linux system boots without /bin/sh
Apt-get and its irritating lack of easy selective upgrades »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sun Mar 6 03:58:33 2016
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.