Closed
Bug 1371952
Opened 4 years ago
Closed 4 years ago
ProcessPriorityManager does unnecessary hashtable lookups
Categories
(Core :: IPC, enhancement, P3)
Core
IPC
Tracking
()
RESOLVED
FIXED
mozilla56
| Tracking | Status | |
|---|---|---|
| firefox56 | --- | fixed |
People
(Reporter: mats, Assigned: mats)
References
Details
(Keywords: perf)
Attachments
(1 file)
|
2.30 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•4 years ago
|
||
Attachment #8876425 -
Flags: review?(nfroyd)
Comment 2•4 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•4 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•4 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•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f7c41eeb1420
Status: NEW → RESOLVED
Closed: 4 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
•