Closed Bug 1370700 Opened 2 years ago Closed 2 years ago

nsDOMAttributeMap does unnecessary hashtable lookups

Categories

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

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: mats, Assigned: mats)

References

Details

(Keywords: perf)

Attachments

(2 files)

No description provided.
FYI, bz said in bug 1370632 comment 6:
>mAttributeCache can't contain null values.
Attachment #8875345 - Flags: review?(nfroyd)
Comment on attachment 8875345 [details] [diff] [review]
part 2 - Use mAttributeCache.GetOrInsert() to avoid a second hashtable lookup for Put()

Review of attachment 8875345 [details] [diff] [review]:
-----------------------------------------------------------------

I will trust bz's guidance on this one. ;)
Attachment #8875345 - Flags: review?(nfroyd) → review+
Attachment #8875344 - Flags: review?(nfroyd) → review+
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/883902e4d999
part 1 - Use mAttributeCache.LookupRemoveIf() to avoid a second hashtable lookup for Remove().  r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/eb418afc24af
part 2 - Use mAttributeCache.GetOrInsert() to avoid a second hashtable lookup for Put().  r=froydnj
https://hg.mozilla.org/mozilla-central/rev/883902e4d999
https://hg.mozilla.org/mozilla-central/rev/eb418afc24af
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.