Closed Bug 832546 Opened 12 years ago Closed 1 year ago

Font drawing on Wikipedia homepage causes browser stutter


(Core :: Graphics, defect)






(Reporter: vladan, Unassigned)


If you clear your disk cache or restart your machine and then visit, you will notice that the browser becomes unresponsive for a few seconds.

The following profile shows that the main thread becomes busy drawing fonts (this bug) and capturing thumbnails (bug 720575):

Without hardware acceleration:

I think font loading might be particularly costly on because it contains text from many languages.
What's the comparison with IE9/10 like for the same set of steps?  And is this different for a non-wikipedia page?

Testcases of some sort would probably be useful here, two pages of roughly equal size text wise.  The wikipedia homepage page has funky perf characteristics in terms of fonts because it's basically sucky in a zillion fonts to cover all the scripts displayed on the main page.  Actual content pages have less.
As an anecdotal data point, this really chugged hard for TenFourFox, especially since it still uses the old ATS font code which had some gross inefficiencies. During testing on some Wikipedia pages it ends up enumerating nearly every font on the system, which lags hard. Our temporary solution was to speed up how font tables are sought; see

Still, it seems like the enumeration (for char maps, it looked like?) could be moved to some other point and/or better cached.
Severity: normal → S3

Unable to reproduce in recent versions.

Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.