Closed Bug 1376473 Opened 9 years ago Closed 9 years ago

nsHashPropertyBagBase::DeleteProperty does unnecessary hashtable lookups

Categories

(Core :: XPCOM, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: perf)

Attachments

(1 file)

No description provided.
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
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: