Closed
Bug 1371061
Opened 8 years ago
Closed 8 years ago
nsBaseHashtable::GetOrInsert does two hashtable lookups in the Insert case
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: perf)
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•8 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•8 years ago
|
||
Comment 3•8 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•8 years ago
|
||
Try looks green so far so I think it'll pass.
Attachment #8875526 -
Flags: review?(nfroyd)
Updated•8 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•8 years ago
|
Whiteboard: [qf] → [qf:p1]
Comment 6•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•3 years ago
|
Performance Impact: --- → P1
Whiteboard: [qf:p1]
You need to log in
before you can comment on or make changes to this bug.
Description
•