No subject


Thu Mar 11 09:13:00 PST 2010


way. x11perf can tell you if core fonts are faster or slower on your
particular driver if you happen to care, but I suspect it's not
important (or even the same from driver to driver). So the thing that
differs consistently is start-up performance. Especially when you are
running over a network.

Server fonts require a lot of round-trips (ListFonts, QueryFont, etc) to
do a decent job. XCB can help hide a lot of the latency compared to
Xlib, but it still isn't as good as handling everything locally. So core
fonts hurt in a high-latency environment.

If you QueryFont a mostly populated iso-10646 font, you're transferring
many times the data compared to just pushing (via RENDER) the
comparatively few glyphs you're going to use. Maybe somewhere on the
order of 360kB. QueryFont three of those, and you've stalled your app
for an entire second on a 10Mbit connection (eg. typical wireless-g), or
~10s on a 1Mbit WAN connection. For latin-1 fonts this isn't much of an
issue, but you don't know which fonts are installed on the server until
you ask. So core fonts hurt in a low-bandwidth environment.

Also, processing fonts stalls the server. So if your app does a
QueryFont on a large font, the entire desktop can stall for a few
seconds on a slower CPU (You might want me to retire this old Pentium-3
machine, but it works fine for most things. Just not so much for unicode
core fonts. Besides, ask anyone with an N900 if they want less battery
life in exchange for a more powerful CPU). QueryFont has to effectively
rasterize every glyph in order to get the ink metrics, whereas
client-side only needs to process the glyphs it cares about. At the
limit, where the app does need all the glyphs, I'd much rather just your
app stalled while processing big fonts and not the whole desktop. So
core fonts hurt in a low-CPU environment.

Peter Harris
-- 
               Open Text Connectivity Solutions Group
Peter Harris                    http://connectivity.opentext.com/
Research and Development        Phone: +1 905 762 6001
pharris at opentext.com            Toll Free: 1 877 359 4866


More information about the Xcb mailing list