I recently took another shot at trying to get rid of my long-running Firefox performance problems, which I had narrowed down to garbage collection stalls resulting from memory bloat. The good news is that I seem to have found what was causing my memory problems. The bad news is that it's in extensions that I more or less care about.

The first necessary disclaimer is that I haven't gone through the painstaking work to test extensions in isolation (especially in my normal browsing environment). What I can say is that using just my core extensions of NoScript, FireGestures, It's All Text, the last working version of CookieSafe, and the Mozilla all-JavaScript PDF viewer leaves Firefox's memory usage stable and performance excellent. If I add either or both of Stylish and GreaseMonkey, memory usage climbs slowly but steadily and I see my usual performance issues. Given that GreaseMonkey is a heavily used extension, I suspect that my problems with it are due to either some interaction with my other extensions or with the specific user script that I use. The same may be true for Stylish (although there is one review that suggests other people are having memory problems with it).

(While I haven't seen memory bloat with Status-4-Evar, having it active seems to make Firefox's scrolling somewhat less snappy for me. Without GreaseMoneky and Stylish, the status bar is relatively empty anyways so I've currently experimenting with disabling S4E.)

Although I called GreaseMonkey and Stylish essential extensions back here, I can in practice live without them. Having mangled Google search results and various badly formatted websites irritates me, but I can sort of live with them (and the cure for the latter is to stop visiting those websites). I wish I didn't have to, so I keep hoping that Firefox will come up with a better solution for whatever is causing these leaks.

(Given that my bloat seemed to involve a lot of compiled JavaScript code sitting around, I'm now wondering if Firefox has something like Java's PermGen issues with loaded code and compiled/JIT'd functions sticking around when they shouldn't.)