Created attachment 619808 [details] [diff] [review] Proposed patch. For months I've been getting minute-long shutdown times after using the browser for a long time. I managed to turn up the following culprit in FUEL: http://mxr.mozilla.org/mozilla-central/source/toolkit/components/exthelper/extApplication.js#594 Which is an n^2 loop for clearing out an array. Indeed most of the cost is in memmove. The question is why this array is getting so big. I suspect it's an addon using FUEL inappropriately. In the meantime, at least we can speed up the emptying of the array. Apologies if this is misfiled, as I have no idea who maintains FUEL...
> The question is why this array is getting so big. Because FUEL's management of this array is totally broken. See bug 750454 which bent filed today. The patch here helps the memmove issue, but not the memory leaks FUEL is causing here.
Duping over to bug 750454.
Unduping per #content.
Comment on attachment 619808 [details] [diff] [review] Proposed patch. [Approval Request Comment] Case for branch / ESR consideration: Bad bug (causes very long shutdown times), trivial fix. Fix Landed on Version: FF15 Risk to taking this patch (and alternatives if risky): Trivial change. String changes made by this patch: None.
Comment on attachment 619808 [details] [diff] [review] Proposed patch. happy to get these perf wins on beta/aurora, but denying for ESR since there's no current requests for this with the enterprise users.
(In reply to Lukas Blakk [:lsblakk] from comment #8) > happy to get these perf wins on beta/aurora, but denying for ESR since > there's no current requests for this with the enterprise users. That's OK, I don't care about the enterprise. :-P https://hg.mozilla.org/releases/mozilla-aurora/rev/fb8127fcaac4 https://hg.mozilla.org/releases/mozilla-beta/rev/303d987789c5 QA: If you'd like to verify this fix, you're probably best off installing an old version of the Readibility add-on (bug 730546) and trying to coax it into creating a lot of objects. Things like switching tabs create new objects with the old Readability. I don't have a solid test-case; you will have to experiment, unless pcwalton has better STR.
We'll try to verify this using the suggestions in comment 9.
Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20100101 Firefox/13.0 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20100101 Firefox/13.0 Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0 Used the steps from comment #9, but could not reproduce the issue: Firefox closed normally.