Closed Bug 1124545 Opened 5 years ago Closed 5 years ago

Avoid creating the mergedFeatures hash table when possible

Categories

(Core :: Graphics: Text, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: njn, Assigned: njn)

References

Details

Attachments

(1 file)

When scrolling all the way through
https://bugzilla.mozilla.org/show_bug.cgi?id=MNG, |mergedFeatures| gets
initialized more than 50,000 times -- each one involving a heap allocation for
the entry storage -- but it never has anything put into it.

This patch moves |mergedFeatures| into MergeFontFeatures(), which allows it to
not be created in the common case.
Comment on attachment 8552871 [details] [diff] [review]
Avoid creating the mergedFeatures hash table when possible

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

looks good!
Attachment #8552871 - Flags: review?(jdaggett) → review+
https://hg.mozilla.org/mozilla-central/rev/7060fb7bb084
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.