Closed
Bug 1375688
Opened 8 years ago
Closed 8 years ago
HTMLFormElement does unnecessary hashtable lookups
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Core
DOM: Core & HTML
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.
| Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8880624 -
Flags: review?(nfroyd)
Comment 3•8 years ago
|
||
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+
Updated•8 years ago
|
Flags: needinfo?(nfroyd)
| Assignee | ||
Comment 4•8 years ago
|
||
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
Comment 6•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 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
•