Last Comment Bug 832546 - Font drawing on Wikipedia homepage causes browser stutter
: Font drawing on Wikipedia homepage causes browser stutter
Status: NEW
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All All
-- normal with 2 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Milan Sreckovic [:milan]
Depends on:
  Show dependency treegraph
Reported: 2013-01-18 15:56 PST by Vladan Djeric (:vladan)
Modified: 2013-04-10 04:27 PDT (History)
11 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image Vladan Djeric (:vladan) 2013-01-18 15:56:05 PST
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.
Comment 1 User image John Daggett (:jtd) 2013-01-18 18:53:56 PST
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.
Comment 2 User image Cameron Kaiser [:spectre] 2013-01-29 13:22:04 PST
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.

Note You need to log in before you can comment on or make changes to this bug.