Closed
Bug 851264
Opened 11 years ago
Closed 11 years ago
Change eventSource in dbg-client.jsm to use Set (and maybe Map) for listeners
Categories
(DevTools :: Debugger, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: bbenvie, Assigned: bbenvie)
Details
Attachments
(1 file)
2.37 KB,
patch
|
Details | Diff | Splinter Review |
eventSource currently uses a plain object to store the mapping of events to listeners, and the listener groups are arrays. eventSource.removeListener works by filtering the array of listeners and creating an entirely new array, so is inefficient (eventSource.addOneTimeListener uses this). As the event handler methods tend to be hot code, I think it would worth optimizing by switching to Sets for the listeners instead of arrays. A more minor optimization would be to switch the events object to use a Map.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → bbenvie
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
Since we're planning to migrate to using Addon SDK's EventEmitter, this is unneeded.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•