Optimizing KDE 3.1.x
David Lechnyr writes "This article goes into detail on optimizing KDE for speed. Typically, most distributions include pre-compiled binaries of KDE which are optimized for an Intel i386 computer. Chances are that you're running something faster than this; if so, this should help you tweak the compile process to speed things up a bit."
Gentoo does all this by default. To compile and install optimized binaries for kde, you just type "emerge kde"
Using prelink will also provide additional optimization.
See http://www.sourcemage.org/ All source, downloaded from the authors site and compiled to the settings and optimizations YOU choose.
"Does" this all for you. By "does", I mean that the install guide forcefully tells you to alter your /etc/make.conf file to include support for the features you want and the optimizations you want.
Btw, you don't just sit around for 8 hours waiting for something to compile. If you're in CLI-only, you do the following:
emerge screen
screen emerge kde
C^A C^C
Then you do whatever else you want to do. I recommend getting IRSSI and Lynx for internet-amusement.
If you already have Xfree86 setup, then you do the following:
emerge ratpoison
C^A C^C
Then run whatever graphical X-programs you want in your new ratpoison windows.
This is the beauty of a *modern day* multi-tasking OS like GNU/Linux. This isn't the same crap as Micro$oft. You can compile something AND do other things at the same time, since memory management is great as is multi-tasking (depending on your kernel and compile options for the kernel). Try compiling something using MS's compilers and doing something else at the same time. I compiled WindowMaker, for example, while doing other tasks in ratpoison.
As for compile-time optimizations, I recommend the following:
CFLAGS = -march=cpu_type -Os -pipe -fomit-frame-pointer
That will optimize for small-size binaries and minimal RAM usage. I recommend the -Os optimization for the vast majority of applications, most of which are not CPU-intensive. That includes WMs, DEs, word-processors, spreadsheets, internet browsers, e-mail programs, GIMP, etc. I recommend -O2 for things which are CPU-intensive, like video/sound players, video/sound encoders, DNA/AA sequence alignment, and bayesian phylogenies.
Make sure to
man gcc
So you know what your doing. Hint: once you hit a certain point with optimization, you can't have it both ways. Higher levels of optimization involve trading a memory/speed tradeoff, and you can go one way or the other. As I suggested before, I suggest memory optimizations for non-CPU intensive programs (the one's you'll probably be using all of the time, thus which'll be clogging up your memory); and speed optimizations for CPU-intensive programs, which you probably won't use as much.
social sciences can never use experience to verify their statemen
Experimental? Come on. Maybe -O3 and then a series of other additional optimizations beyond that are experimental. But the sane optimizations most people use are not experimental. I, myself, default to:
-march=athlon-tbird -Os -pipe -fomit-frame-pointer
Btw, compiling everything from scratch is hardly "unstable". That's what FreeBSD does. Furthermore, memory optimizations often-times increase system-stability, by reducing the likelihood of situations where there isn't enough RAM. Furthermore, some of the USE settings increase stability by eliminating compiled-in support for crap that you don't use. If you don't use something, and support for it is compiled in, it's just useless crap that has the potential to reduce stability.
social sciences can never use experience to verify their statemen
This optimizes the hell out of KDE, and it reduces the memory footprint as well. It's such a simple script that I include it right in my ~/.cshrc file:
alias kde twm
You can substitute fvwm2 or some other window manager if you're not a tab enthusiast.
the difference between a 386, 486, and pentium I-IV isn't just clockspeed and MMX, a handful of new instructions have been added. If you don't specify the arcitecture, you'll generate i386 compatable code.
so if (i == 0) i = 1234; will generate code like this:
cmp eax,0
jne L1
mov eax, 1234
L1:
A PII however, can do this:
cmp eax,0
cmove eax,1234
that might not look all that much better, but branches are a huge bubble in the pipeline, and are horrible for performance.
Do you even lift?
These aren't the 'roids you're looking for.