wstephenson / klyde

5 stars 0 forks source link

investigate why so many KDE applications load so many shared objects they never really need #1

Open cobexer opened 11 years ago

cobexer commented 11 years ago

first of all: sorry for posting this here but adding a comment to your blog.kde.org post is impossible for non kde developers, and trello would not let me add comments without being part of the project either, then on obs there is no commenting on repos, and so here it goes (btw: you could have added a few links to this to the things mentioned above, was hard to find) :)

example output of zypper ps, which is how i found out that lots of applications load image/sound/... plugins they never use, at least i have no idea how i would get yakuake (a konsole like application) to display .psd files...

this list is just what changed by the update there may be more... 1172 | 1 | 1000 | ... | yakuake | | /usr/lib64/libknotifyconfig.so.4.10.2;516960de
| | | | | | /usr/lib64/libkparts.so.4.10.2
| | | | | | /usr/lib64/libkio.so.5.10.2
| | | | | | /usr/lib64/libkdecore.so.5.10.2
| | | | | | /usr/bin/yakuake (deleted)
| | | | | | /usr/share/locale/de/LC_MESSAGES/libkonq.mo
| | | | | | /usr/lib64/libkonq.so.5.10.2
| | | | | | /usr/lib64/kde4/plugins/imageformats/kimg_xcf.so
| | | | | | /usr/lib64/libknewstuff3.so.4.10.2;516960de
| | | | | | /usr/lib64/kde4/plugins/imageformats/kimg_psd.so
| | | | | | /usr/lib64/kde4/plugins/imageformats/kimg_xview.so
| | | | | | /usr/lib64/kde4/plugins/imageformats/kimg_tga.so
| | | | | | /usr/lib64/libkdeui.so.5.10.2
| | | | | | /usr/lib64/kde4/plugins/imageformats/kimg_rgb.so
| | | | | | /usr/lib64/kde4/plugins/imageformats/kimg_ras.so
| | | | | | /usr/lib64/kde4/plugins/imageformats/kimg_pic.so
| | | | | | /usr/lib64/kde4/plugins/imageformats/kimg_dds.so
| | | | | | /usr/lib64/libkpty.so.4.10.2
| | | | | | /usr/lib64/kde4/plugins/imageformats/kimg_pcx.so
| | | | | | /usr/lib64/kde4/plugins/imageformats/kimg_exr.so
| | | | | | /usr/lib64/libkfile.so.4.10.2
| | | | | | /usr/lib64/kde4/plugins/imageformats/kimg_jp2.so
| | | | | | /usr/share/locale/de/LC_MESSAGES/libphonon.mo
| | | | | | /usr/lib64/libnepomukquery.so.4.10.2;516960de
| | | | | | /usr/lib64/libksuseinstall.so.1
| | | | | | /usr/lib64/kde4/plugins/imageformats/kimg_eps.so
| | | | | | /usr/lib64/libnepomuk.so.4.10.2
| | | | | | /usr/lib64/libsolid.so.4.10.2
| | | | | | /usr/lib64/libnepomukutils.so.4.10.2;516960de

jospoortvliet commented 11 years ago

Yeah, I get what you mean, but this isn't a problem: these libraries are shared with all other KDE apps which are running and even if they weren't, they'd be not actively loaded in memory (just mmapped on the drive) until they are needed - never, in case of Konsole ;-)

Thanks for thinking about this, though...

wstephenson commented 11 years ago

I wonder about it too, but I don't have the expertise to assess whether that linkage has a cost and is excessive. I'll ask some colleagues. I do dispute that zypper ps output actually shows that yakuake is actually loading the plugins all the time though.

cobexer commented 11 years ago

loading those shared objects isn't free, especially c++ libraries likely have a lot of symbols that may need to be resolved. Also the LD_DEBUG output shows that _init and _fini are called for those libs, so if any of those libs would crash in _init that would affect a lot of KDE application (if not all...)

see the output of LD_DEBUG=all konsole --nofork -v for an example