Bug 32186
| Summary: | [Qt] Changing default font from Arial/Times New Roman/fixed to sans-serif, serif, monospace appears to save 400msec on loading | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Holger Freyther <zecke> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Enhancement | CC: | benjamin, hausmann, jturcotte, markus, robert |
| Priority: | P2 | Keywords: | Performance, Qt, QtTriaged |
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | OS X 10.5 | ||
Holger Freyther
In the Maxwell_Equations article the painting/layout code is blocking the event loop for more than a second. The two most expensive operations are font matching (fontconfig) and harfbuzz. This bug is about exploring the fontconfig madness..
Currently we ask fontconfig to find us a font called "-webkit-sans-serif", "-webkit-serif". This is a default in the CSS and then gets replaced by the WebCore::Setting. The current FontCacheQt is ignoring the family string argument. Tor Arne had a patch to fix this (mostly to fix things on windows). We should urgently start querying for the proper family name.
The second part is that changing the default font names in QWebSettings from Arial, Times New Roman, to sans-serif, serif... seems to improve page loading speed. We will have to look more carefully.
I have enabled font match debugging in QFontDatabase and also dump the pattern from inside the WebKit/GTK+... the Qt pattern/match contains so much more "elts" that I wonder what we are doing wrong?
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Tor Arne Vestbø
Please follow the QtWebKit bug reporting guidelines when reporting bugs.
See http://trac.webkit.org/wiki/QtWebKitBugs
Specifically:
- The 'QtWebKit' component should only be used for bugs/features in the
public QtWebKit API layer, not to signify that the bug is specific to
the Qt port of WebKit
http://trac.webkit.org/wiki/QtWebKitBugs#Component
- Add the keyword 'Qt' to signal that it's a Qt-related bug
http://trac.webkit.org/wiki/QtWebKitBugs#Keywords
Benjamin Poulain
Holger, what should we do about this task?
It was mostly a reminder for you, but I think you don't plan to work on this anymore.
Holger Freyther
(In reply to comment #2)
> Holger, what should we do about this task?
> It was mostly a reminder for you, but I think you don't plan to work on this anymore.
Do you think you could measure such a simple QWebSettings patch? If not let us close this bug.
Robert Hogan
(In reply to comment #0)
> Currently we ask fontconfig to find us a font called "-webkit-sans-serif", "-webkit-serif". This is a default in the CSS and then gets replaced by the WebCore::Setting. The current FontCacheQt is ignoring the family string argument. Tor Arne had a patch to fix this (mostly to fix things on windows). We should urgently start querying for the proper family name.
This part sounds related to:
https://bugs.webkit.org/show_bug.cgi?id=36351
Jocelyn Turcotte
=== Bulk closing of Qt bugs ===
If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.
If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.