Highly Optimized KDE3 w/ objprelink

Various Stuff

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

0
5 .0
Description:

You want a KDE 3.0 that loads in 1/4 the time? Howzabout a konqueror that starts up in 1-4 secs, rather than the 6-10 normal seconds? Sure you do.

I recently re-built my QT and KDE with objprelink optimizations. And wowee-wow-wow. The fast just got faster. The best, better. My toast now butters itself. I don't know what that last line meant.

In any case, I was given the attached script (it's in a zip file 'cause you can't upload .sh's) to help me re-build my KDE3.0 and QT from source with the opts.

Step 1: Go to the objprelink homepage, read up and get the tarball'd source. Build it, install it

Step 2: get the KDE 3.0 final sources from your local ftp mirror

Step 3: read the build.sh script, and configure it to yer situation.

Step 4: run the script, and wait.

Notes and caveats:
if you have an existing version of KDE installed, i don't know what will happen. i always build my kde in /usr/local/kde-x.x and symlink that dir to /usr/local/kde, and put /usr/local/kde/libs in ld.so.conf and /usr/local/kde/bin/ in my path. that way, i can change the symlink to whatever version of kde i want. yippee! i suggest you do the same, as your mileage may vary with this optimization.

Now, for those of you with some patience, you are probably wondering what objprelink does. Well, C++ apps call upon libraries to do a lot of work, and the thing that loads the libraires is called the dynamic linker. This, at the moment, is a big bottleneck to application startup in KDE (and i'd assume elsewhere). objprelink optimizes the linking of these applications, which makes the loading more eficient and faster, thus causing the bottlenck to be disc access.

Eudial

17 years ago

10 sec to load konqueror?
Thats outrageous!

Mine loads instantly.

Report

silcndrgn

18 years ago

I get a very weird problem when I
try to build Qt 3.0.3 on my system
with object prelinking. Using the
appropriate configure flags, and of
course getting the objprelink util
from the aforementioned web site,
I get a segfault when building Qt.
I even made sure I am using yacc,
and not bison as the documentation
suggested (though I do not believe
this is related).
Here is the error:
make[1]: `Entering /usr/qt/src'
/usr/qt/bin/moc kernel/qapplication_x11.cpp -o .moc/release-mt/qapplication_x11.moc
make[1]: *** [.moc/release-mt/qapplication_x11.moc] Segmentation fault
Weirdness. :( And I was all
excited about a performance boost!
(Please forgive me for any
formatting weirdness in this post.
I am kind of confined to Lynx at
the moment for obvious reasons. ;)

Report

north

18 years ago

I got a similar error when trying to use the objprelink binary for Slackware under Gentoo (where I couldn't compile it myself, for whatever odd reason). Have you tried to run the moc binary just 'as-is'? If it still segfaults, you might want to run it in gdb and see if that will output anything useful.

I know this in itself might not be mouch help, but it could provide a pointer to what is going wrong, and help others provide more useful feedback.

Report

bazmonkey

18 years ago

Hey, just letting you all know you're not alone. I have debian unstable, with my own builds of KDE3 and QT3. Objprelink doesn't seem to be a problem, Debian's libc is newer than Slackware's, and I can't find the problem. Gdb gives nothing, it appears to segfault right at the beginning. At first I thought Bison was to blame, but it's not, I've tried it, yacc, byacc, etc.

I hope someone's interested in this, because there's next to no documentation and you're the only people I can find even trying this.

If it helps anyone more savvy than I, QT will compile just fine without objprelink, with bison or whatever. I have access to my laptop and two dual proc monsters, and none of them can do it. They're all debian, so it's not a proc problem.

If anyone has anything helpful (If you have done this exact thing on another box, if so which version, or if you have gotten it to work on Debian, etc.), PLEASE post here or e-mail me at blalli@email.arizona.edu. It's not mission-critical, but these things annoy me. Thanks

Report

silcndrgn

18 years ago

By the way, I went ahead and tried to build KDE with object prelinking (but not with QT)... and strangely, it seems that ALL the binaries just segfault immediately. I discovered this while trying to configure kdebase, and the kde-config utility reported no prefix. Strangely, it only segfaulted when running. Truly weird. Very stupid. By the way, I am running Debian, Sid (unstable)...

Report

renoken

18 years ago

Hi,
I have the same problem here, trying to make qt3. Configure went fine, but make gives a segmentation fault on [.moc/release-mt/qapplication_x11.moc] Segmentation fault.
I'm running Mandrake.

Report

silcndrgn

18 years ago

I get a very weird problem when I
try to build Qt 3.0.3 on my system
with object prelinking. Using the
appropriate configure flags, and of
course getting the objprelink util
from the aforementioned web site,
I get a segfault when building Qt.
I even made sure I am using yacc,
and not bison as the documentation
suggested (though I do not believe
this is related).
Here is the error:
make[1]: `Entering /usr/qt/src'
/usr/qt/bin/moc kernel/qapplication_x11.cpp -o .moc/release-mt/qapplication_x11.moc
make[1]: *** [.moc/release-mt/qapplication_x11.moc] Segmentation fault
Weirdness. :( And I was all
excited about a performance boost!
(Please forgive me for any
formatting weirdness in this post.
I am kind of confined to Lynx at
the moment for obvious reasons. ;)

Report

north

18 years ago

The homepage is located at http://leon.bottou.com/objprelink/

Note that it might or might not compile under Slackware 8 and even if it does compile it might not work. If it does work, fine, if it doesn't, read up on the objprelink homepage to find a link to a binary of objprelink for slackware users.

I also suggest setting, for P3/P4 and equivalent/better users, the CXXFLAGS and CFLAGS variables to '-march=i686 -mcpu=i686 -O3' for optimized, speedy packages. If any ./configure fails to run because of this, setting -O2 instead of -O3 might help to get things going. The difference between -O2 and -O3 isn't that great, anyway.

On my system, I don't really get a great increase in speed between KDE 3.0 w/ objprelink and KDE 3.0 without (bot compiled with the above CFLAGS and CXXFLAGS); both installs were quick and responsive. I have seen it make a major difference, however, so I recommend giving it a try.

Before you do this, you might want to ask your distribution makers if their KDE 3 packages aren't already compiled against objprelink - it just might save you some time. :)

Happy KDE:ing.

Report

C

thelocust

18 years ago

well, on my Slack 8.x system, i have had no problems, no segfaults, no weirdness at all -- yet. and my load times have dramatically decreased for all of my KDE apps. I'm totally happy about it all.

Why isn't this in KDE 3.0 already? It's been around for almost a year. I dunno!

Report

north

18 years ago

Technically, it is already in KDE, you just need to compile the kde packages with the --enable-objprelink configure option. That it's not turned on by default is because it *might* cause problems on various distros/configurations, and because it's so far only really been tasted on x86/linux. Since KDE is targeted at more than just Linux, having it this way makes way more sense.

With the coming possibility of system-integrated prelinking, this will become a moot operation. objprelink is only there as a temporary solution, until the system-level replacement is ready, as far as I can tell. (Look at the objprelink page for more information).

I managed to compile and get objprelink to run without using the provided binary on the second run I tried, but it really didn't make a whole lot of difference to me, like I previously stated. Objprelink or not, KDE 3 is -very- fast on my system, which I of course see as a very good thing. :')

Report

silcndrgn

18 years ago

It's highly unstable. It's a hack. It's not mature, not well tested, and not embraced as a standard by any means. It's also largely limited in scope (x86 only). Plus, software must often cater to the lowest common denominator, so you don't want all the most intense optimization for your binaries. Doing so restricts the number of people who can run your software. Most people don't want to build from source, so this is not default. If you want it, you have to do it yourself... which is best because only the people who understand why and what they're doing not be offended when it crashes left and right.

Report

ZIOlele

18 years ago

http://leon.bottou.com/objprelink
and if you can compile the thingh let me know...

Report

renoken

18 years ago

the compiling of objprelink worked

Report

renoken

18 years ago

Can you use objprelink when you want to install kde3.0.1 from cvs?

Report

affenschlaffe

18 years ago

Hi Reno
Yes it is possible to do the objprelink stuff with cvs. I've been doing that since 2 months or so - right now I'm running today's CVS with objprelink without any problems. Your mile..... ;-)
Micha

Report

renoken

18 years ago

could you give us also a url...
plzzzz... ;-)

Report

ZIOlele

18 years ago

I don't want to start a flame, but it's just me or KDE is faster (in general) on slack?_?

Report

dek

18 years ago

..yes KDE3 is a whole lot faster than KDE2 !
Actually run the RPM's for Mandrake, i'm curious about what happens when my rebuild is finished. :)

The developers really did a great job !

Report

12345678910
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.9 beta RC1
updated Apr 09 2002
added Apr 09 2002
downloads 24h
0
mediaviews 24h 0
pageviews 24h 0