slow konsole startup - font handling

aleXXX alexander.neundorf at gmx.net
Sat May 4 18:31:27 BST 2002


Hi,

konsole in KDE 3 starts on my system damn slow (ok, I got it back from 4.5 to 
3.7 seconds in the meantime, compared to 1.8 seconds in late KDE 2).

Almost one second is spend on my box on loading a unicode font 
"-misc-fixed-medium-r-normal--12-120-75-75-c-0-iso10646-1". 

After this it loads a font 
"-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1", what takes 
almost no time.

In TEWidget::fontChange() there is a QFontMetrics object created. This one 
calls in its ctor d->load(); which means to load the font. 
QFontPrivate::load(script, bool tryUnicode); contains a line

"if (tryUnicode && !loadUnicode(...))
{
   ...
   return;
};"

tryUnicode is the second parameter of load() and defaults to true. Since the 
QFontMetrics ctor calls load() without default arguments, the unicode font is 
loaded, although the actual font is iso8859, so it actually wouldn't have to 
load the unicode font.

Can anything be done to improve the situation ?
Is the QFontMetric stuff in TEWidget::fontChange() really needed ?
Is it really required that the QFontMetrics ctor always calls load() with 
tryUnicode==true ?

Bye
Alex




More information about the kde-core-devel mailing list