When you just compare map-loading times you may forget that maps can be cached in RAM and so load MUCH faster when you restart the game. Even if you use another binary, the data is just the same.
Can one of you please give me short hint, how to create static binaries instead dynamically-linked ones?
I have separate map files for each client. Sure it is possible that they were still in the disk cache, because I didn't restart the computer, but I ran the same test several times to make sure that I get results that are as close to the reality as possible. The results from the Bronzedoors map were most persistent, other maps were giving much more random results, sometimes better, sometimes worse, probably due to caching.
The following instructions may have mistakes, I don't have time right now to test them and I'm just writing them down from my memory.
1. Export your own compiler flags. The following are for my PC and you may need to use something else:
$ export CFLAGS="-march=pentium4 -O3 -fomit-frame-pointer -msse3"
$ export CXXFLAGS="${CFLAGS}"
If you want to use different optimization, like -O2, scan all the Jamconfig files generated by configure scripts and remove reference to "-O3" there.
2. Get the sources as you would for dynamically linked binaries or run "jam distclean" in CS/CEL/PS and "make distclean" in CAL3D.
3. When configuring CAL3D, add "--enable-static --disable-shared" options to the configure script.
4. In the CS directory, open "plugins/utilities/profiler/profiler.csplugin" and convert CRLF line ends to LF only (Jorrit knows about it and it will be fixed in CS soon).
5. After configuring CS, open the Jamconfig file and delete the line "COMPILER.CFLAGS += "-march=i586" ;".
6. Build CS with the following command:
cs $ jam -aq staticplugins cs-config"
7. When CS is built, go to the "out/linuxx86/optimize/libs/" directory and make links to the libraries there (probably our bug that we have these library names hard-coded):
cs/out/linuxx86/optimize/libs $ ln -s libcrystalspace-1.1.a libcrystalspace.a
cs/out/linuxx86/optimize/libs $ ln -s libcrystalspace_opengl-1.1.a libcrystalspace_opengl.a
cs/out/linuxx86/optimize/libs $ ln -s libcrystalspace_staticplugins-1.1.a libcrystalspace_staticplugins.a
8. Build CEL with the following command (CEL is the only project that doesn't try to overwrite your own compiler flags):
cel $ jam -aq staticplugins cel-config
9. When CEL is built, go to the "out/linuxx86/optimize/libs/" directory and make links again (same reason than for CS):
cel/out/linuxx86/optimize/libs $ ln -s libcel_staticplugins-1.1.a libcel_staticplugins.a
cel/out/linuxx86/optimize/libs $ ln -s libceltool-1.1.a libceltool.a
10. After configuring PS, open Jamconfig and remove the line with "COMPILER.CFLAGS += "-march=i586" ;"
11. And finally, build PS with the following command:
planeshift $ jam -aq client_static