Closed Bug 1658207 Opened 4 years ago Closed 4 years ago

[shared fontlist] Family character-map is not always set/used properly to accelerate fallback searches

Categories

(Core :: Layout: Text and Fonts, defect)

defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(1 file)

Doing some profiling of text-intensive actions, I realized that we don't always use the character map in fontlist::Family records correctly to optimize fallback searches, and we don't always set it up when we should as a result of the InitializeFamily message.

(Noticed while profiling pinch-zoom operations in bug 1657440 (edit: actually bug 1656156); the profile showed more time in SearchAllFontsForChar and InitializeFamily than I would have expected. With this fixed, those methods no longer appear as "hotspots" in the profile.)

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

In my local opt (but non-pgo) build, this accelerates reflows when zooming wikipedia.org (which is quite font-fallback-heavy, because of the mix of languages) by at least 20%.

Blocks: 1656156
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/16346122a824 Set up and use the mCharacterMap in shared Family records more correctly, to accelerate font fallback searches. r=jwatt
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
See Also: → 1659453
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: