Could kdecore depend on kjs?

Thiago Macieira thiago at kde.org
Wed Mar 14 17:35:11 GMT 2007


Chusslove Illich wrote:
>But I am wondering if this plugin story is only for performance/memory
>saving? Because if the overheads are negligible, there is no need to
>complicate things. Eg. where to put that plugin module outside of
> kdecore, when it clearly belongs together with localization module in
> it.

The overhead is not negligible. I can tell you that right now.

Each extra library loaded incurs a performance penalty at load-time. 
There's no way around that. And also note we launch a lot of applications 
at once, so each one must resolve symbols at the same time. kdeinit 
helps, but it's not used by all applications.

Also note that kjs loads PCRE into memory (two more libraries) that isn't 
loaded by the core KDE libraries.

>I'll surely do benchmarks for performance drop due to symbol-lookup.

This means you must measure application load time.

>Regarding the memory overhead when kjs is loaded/linked, should there be
>any? KJS is anyway going to be loaded by something else (Konqueror...)
> in a KDE session.

There's a small impact of non-shareable memory, but that's generally small 
if the library is coded correctly.

Unfortunately for us, C++ classes create unshareable code in the form of 
the virtual tables. Each polymorphic class adds more unshareable data 
(granted, not much; each class derived from QWidget adds 244 bytes on 
i386 and that's a large class)

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070314/1fb14753/attachment.sig>


More information about the kde-core-devel mailing list