Could kdecore depend on kjs?

Lubos Lunak l.lunak at suse.cz
Thu Mar 15 13:08:29 GMT 2007


On Thursday 15 of March 2007, Chusslove Illich wrote:
> > [: Thiago Macieira :]
> > The overhead is not negligible. I can tell you that right now.
> >
> > Each extra library loaded incurs a performance penalty at load-time.
>
> Hm, I'm getting some suspiciously favorable results, is there something
> wrong with doing:
>
> time for i in `seq 1000`; do kde4-config; done
>
> and then measuring and averaging the walltime delta between linked and
> non-linked kjs? ldd reports 37 libs for kde4-config, versus eg. 50 for
> kdialog, so the relative overhead should be more pronounced.
>
> Unless this benchmark is useless, the results are 23.9 ms for non-linked,
> versus 24.5 ms for linked call, a 1.6 ms overhead. That's on a 2 GHz
> AthlonXP, and it predictably went to about 4.1 ms when I downclocked it to
> 700 MHz.

 It was 'each extra library' and it gets the worse the more there are of them 
(so there's no relative overhead). You can add one more and not see anything 
wrong, but the same way you can add one a hundred times and suddenly see a 
problem.

 Anyway, looking at the slowly growing ldd output, I think this is simply 
about how often required functionality this is, which I can't find in this 
thread. Will the German locale need this? Czech? Russian? Chinese? Arabic? If 
the answer to the first one is yes, don't bother and simply link against it, 
it will be loaded in the majority of cases anyway. If it's yes to the second 
and third, consider a plugin if it's not much work. If it's only for the last 
two (kinda assuming they're complex languages, I have no idea), try a bit 
harder with the plugin idea.

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak at suse.cz , l.lunak at kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http//www.suse.cz




More information about the kde-core-devel mailing list