nsDisplayListBuilder::AddToWillChangeBudget does unnecessary hashtable lookups

RESOLVED FIXED in Firefox 56

Status

()

Core
Layout: Web Painting
P2
normal
RESOLVED FIXED
2 months ago
2 months ago

People

(Reporter: Mats Palmgren (vacation - back in August), Assigned: Mats Palmgren (vacation - back in August))

Tracking

({perf})

Trunk
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

Comment hidden (empty)
Created attachment 8876512 [details] [diff] [review]
Replace a series of Contains+Put+Get+Put hashtable lookups with a single LookupForAdd call
Attachment #8876512 - Flags: review?(nfroyd)
Comment on attachment 8876512 [details] [diff] [review]
Replace a series of Contains+Put+Get+Put hashtable lookups with a single LookupForAdd call

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

::: layout/painting/nsDisplayList.cpp
@@ +1739,5 @@
>                      gWillChangeAreaMultiplier < budgetLimit;
>  
>    if (onBudget) {
>      budget.mBudget += cost;
> +    willChangeBudgetEntry.Data() = budget;

If the type of `budget` was something expensive to copy, this code would not be so great, but it's not so bad this way, I guess.
Attachment #8876512 - Flags: review?(nfroyd) → review+

Comment 3

2 months ago
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7161c9f36756
Replace a series of Contains+Put+Get+Put hashtable lookups with a single LookupForAdd call.  r=froydnj

Comment 4

2 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7161c9f36756
Status: NEW → RESOLVED
Last Resolved: 2 months 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.