Closed Bug 1372022 Opened 7 years ago Closed 7 years ago

nsDisplayListBuilder::AddToWillChangeBudget does unnecessary hashtable lookups

Categories

(Core :: Web Painting, 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.
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+
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
https://hg.mozilla.org/mozilla-central/rev/7161c9f36756
Status: NEW → RESOLVED
Closed: 7 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: