Closed
Bug 1372274
Opened 8 years ago
Closed 8 years ago
Console::StartTimer/StopTimer does unnecessary hashtable lookups
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: perf)
Attachments
(1 file)
No description provided.
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8876775 -
Flags: review?(nfroyd)
Comment 2•8 years ago
|
||
Comment on attachment 8876775 [details] [diff] [review]
Use LookupForAdd instead of Get+Put, and LookupRemoveIf instead of Get+Remove, to avoid unnecessary hashtable lookups
Review of attachment 8876775 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/console/Console.cpp
@@ +2087,5 @@
> + mTimerRegistry.LookupRemoveIf(key,
> + [&found, &entry] (const DOMHighResTimeStamp& aValue) {
> + entry = aValue;
> + found = true;
> + return true; // remove it
Maybe we should change this to some sort of eRemove/eKeep constant so that we don't have to insert these kind of constants.
Attachment #8876775 -
Flags: review?(nfroyd) → review+
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/40a933ae0d2f
Use LookupForAdd instead of Get+Put, and LookupRemoveIf instead of Get+Remove, to avoid unnecessary hashtable lookups. r=froydnj
Comment 4•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•