[code quality] Fix event listener leaks

RESOLVED FIXED in 2013-06-20

Status

Marketplace
Consumer Pages
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: basta, Assigned: basta)

Tracking

({perf})

2013-06-20
x86
Mac OS X
Points:
---

Details

(Whiteboard: [qa-])

(Assignee)

Description

5 years ago
Event listeners are getting leaked left and right. Some page loads can add as many as 20 event listeners to the DOM which don't get cleaned up on navigation.

It's likely that element references are being cached by jQuery or getting somehow stored in the global scope. When the detached DOM nodes don't get GCed, their event listeners don't get GCed. This causes a buildup over time, slowing performance and ballooning the memory footprint.

On desktop, the memory footprint can expand past the 1GB mark if you browse around long enough, mostly because events aren't getting GCed, which means that closures aren't getting GCed, which means that compiled code isn't getting GCed.
(Assignee)

Updated

5 years ago
Keywords: perf
(Assignee)

Comment 1

5 years ago
This was mostly finished here:

https://github.com/mozilla/fireplace/commit/b1ec58e3b714c6487583cdeab8ce4cff9d616a60

There are still some rough edges in reviews, but they aren't huge perf hits.
Assignee: nobody → mattbasta
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-06-20

Comment 2

5 years ago
Can you please add some STRs or mark this bug as [qa-] ?
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.