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
:
Mentors:
Depends on:
Blocks:
  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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Vladan Djeric (:vladan) 2013-01-18 15:56:05 PST
If you clear your disk cache or restart your machine and then visit www.wikipedia.org, 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):

http://people.mozilla.com/~bgirard/cleopatra/#report=ee696391b9074472ee634e18c6bad5ef0d078187

Without hardware acceleration:

http://people.mozilla.com/~bgirard/cleopatra/#report=a02bb730352d9651996937cb2ddfa73939e40e04

I think font loading might be particularly costly on wikipedia.org because it contains text from many languages.
Comment 1 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 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 https://code.google.com/p/tenfourfox/issues/detail?id=195

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.