Closed
Bug 1371061
Opened 4 years ago
Closed 4 years ago
nsBaseHashtable::GetOrInsert does two hashtable lookups in the Insert case
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla55
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: mats, Assigned: mats)
References
Details
(Keywords: perf, Whiteboard: [qf:p1])
Attachments
(1 file)
|
1.01 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
http://searchfox.org/mozilla-central/rev/1a054419976437d0778a2b89be1b00207a744e94/xpcom/ds/nsBaseHashtable.h#126,131 This is bad for performance obviously.
| Assignee | ||
Comment 1•4 years ago
|
||
It seems to me we could just do a PutEntry instead: http://searchfox.org/mozilla-central/rev/1a054419976437d0778a2b89be1b00207a744e94/xpcom/ds/nsTHashtable.h#147
Assignee: nobody → mats
| Assignee | ||
Comment 2•4 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8390815b624edc0837e60f53006ce4a1d53ca50b
Comment 3•4 years ago
|
||
Thanks for fixing this. I didn't push very hard in the initial bug to do the Right Thing, but I see now that it wouldn't have been very hard to do the Right Thing, which is completely my fault!
| Assignee | ||
Comment 4•4 years ago
|
||
Try looks green so far so I think it'll pass.
Attachment #8875526 -
Flags: review?(nfroyd)
Updated•4 years ago
|
Attachment #8875526 -
Flags: review?(nfroyd) → review+
Pushed by mpalmgren@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/97735d7197e2 Optimize nsBaseHashtable::GetOrInsert() to only do a single hashtable lookup. r=froydnj
Updated•4 years ago
|
Whiteboard: [qf] → [qf:p1]
Comment 6•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/97735d7197e2
Status: NEW → RESOLVED
Closed: 4 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•