Closed Bug 1375688 Opened 8 years ago Closed 8 years ago

HTMLFormElement does unnecessary hashtable lookups

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

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.
Blocks: 1375691
Look like you forgot this one?
Flags: needinfo?(nfroyd)
Comment on attachment 8880624 [details] [diff] [review] Use Lookup instead of Get+Remove/Put, and LookupForAdd instead of Get+Put, to avoid unnecessary hashtable lookups Review of attachment 8880624 [details] [diff] [review]: ----------------------------------------------------------------- Sorry, I thought this review was more complicated than it actually was for some reason. ::: dom/html/HTMLFormElement.cpp @@ +1450,5 @@ > if (content) { > return NS_OK; > } > > + nsCOMPtr<nsIDOMNodeList> nodeList(do_QueryInterface(entry.Data().get())); In the do_QueryInterface call above, you just accessed entry.Data(); can we do the same thing here as well?
Attachment #8880624 - Flags: review?(nfroyd) → review+
Flags: needinfo?(nfroyd)
Yes, bug 1375691 changes this line and drops the get().
Pushed by mpalmgren@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4b46c5332f7b Use Lookup instead of Get+Remove/Put, and LookupForAdd instead of Get+Put, to avoid unnecessary hashtable lookups. r=froydnj
Status: NEW → RESOLVED
Closed: 8 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: