Closed
Bug 1371952
Opened 7 years ago
Closed 7 years ago
ProcessPriorityManager does unnecessary hashtable lookups
Categories
(Core :: IPC, enhancement, P3)
Core
IPC
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: perf)
Attachments
(1 file)
2.30 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8876425 -
Flags: review?(nfroyd)
Comment 2•7 years ago
|
||
Comment on attachment 8876425 [details] [diff] [review]
Use LookupForAdd/LookupRemoveIf to avoid unnecessary hashtable lookups
Review of attachment 8876425 [details] [diff] [review]:
-----------------------------------------------------------------
r=me assuming you agree with the below. If not, we should talk about it.
::: dom/ipc/ProcessPriorityManager.cpp
@@ +507,5 @@
> + [] (RefPtr<ParticularProcessPriorityManager>& aValue) {
> + aValue->ShutDown();
> + return true; // remove it
> + });
> + mHighPriorityChildIDs.RemoveEntry(childID);
Shouldn't this really live inside the lambda in the LookupRemoveIf call as well? I mean, it might not matter if it's done outside the lambda, but that would require a bit of examining to see whether that's safe, and putting it inside the lambda would definitely not change the behavior.
Comment 3•7 years ago
|
||
Comment on attachment 8876425 [details] [diff] [review]
Use LookupForAdd/LookupRemoveIf to avoid unnecessary hashtable lookups
Review of attachment 8876425 [details] [diff] [review]:
-----------------------------------------------------------------
Gah, flip flag.
Attachment #8876425 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 4•7 years ago
|
||
I don't think it should matter, but I agree it's better to keep
the existing behavior exactly as you suggest.
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f7c41eeb1420
Use LookupForAdd/LookupRemoveIf to avoid unnecessary hashtable lookups. r=froydnj
Comment 6•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•