XQueryFont() in nxclient and KDE (with hints on how to improve)

Kurt Pfeifle k1pfeifle at gmx.net
Fri Jul 1 02:15:53 BST 2005


some of you may have seen in person demos of the latest NX and FreeNX 
releases or snapshots at LinuxTag.

Some may have discussed with Gian Filippo Pinzari NX related stuff.

After the event we had some private mail exchange. Here is an important
tidbid he had to say in retrospective:

> Somebody asked if we have suggestions to give to the KDE developers to
> improve the network performances of their desktop. For the KDE people
> who are listening:
> A KDE startup on a SuSE 9.2 makes a single XQueryFont() (that sums up
> to the single XQueryFont() made by nxagent to initialize its font cache
> at startup). So far so good, but then KDE tries to install some applica-
> tions in the system tray. Given that these application are -really- useful
> and that they -really- need to be started by default, these programs make
> alone 40 XQueryFont() and take, to startup, nearly 40 seconds on a modem.
> Without these programs, the whole session wouldn't have taken more than
> 10 seconds. Furthermore, until these programs are loaded, the K menu and
> the desktop are not responding to the user input.
> /Gian Filippo.

I do not know how to fix it properly.

But one or more of you guys may be interested to take a look at that

I'll add another quote (which may be of interest to everyone developing
an NX client or the nxclientlib/nxc:

> For the nxclient developers:
> There is no need at all to query the X core fonts when Xft is avail-
> able, or when the default system font (that is anti-aliased) is found.
> When a font is Xft-enabled, Xft uses RENDER to load and display the
> glyphs, so there is no need to "query" it.
> These unneeded XQueryFont() requests are very annoying. nxagent caches
> the XQueryFont() replies but can't avoid the first request for a font that
> was not queried already. This basically explains why, the first time,
> starting nxclient inside a NX session takes so long.


More information about the kde-core-devel mailing list