Closed
Bug 1376473
Opened 9 years ago
Closed 9 years ago
nsHashPropertyBagBase::DeleteProperty does unnecessary hashtable lookups
Categories
(Core :: XPCOM, enhancement, P3)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla56
| Tracking | Status | |
|---|---|---|
| firefox56 | --- | fixed |
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: perf)
Attachments
(1 file)
|
1.10 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8881420 -
Flags: review?(nfroyd)
Comment 2•9 years ago
|
||
Comment on attachment 8881420 [details] [diff] [review]
Use Lookup instead of Get+Remove to avoid unnecessary hashtable lookups
Review of attachment 8881420 [details] [diff] [review]:
-----------------------------------------------------------------
Would be more straightforward with Remove() returning a bool, but OK.
::: xpcom/ds/nsHashPropertyBag.cpp
@@ -62,5 @@
> nsHashPropertyBagBase::DeleteProperty(const nsAString& aName)
> {
> - // is it too much to ask for ns*Hashtable to return
> - // a boolean indicating whether RemoveEntry succeeded
> - // or not?!?!
See, making Remove return a boolean would be a good idea! :)
Attachment #8881420 -
Flags: review?(nfroyd) → review+
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/aa2050ccc894
Use Lookup instead of Get+Remove to avoid unnecessary hashtable lookups. r=froydnj
Comment 4•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 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
•