[Xapian-discuss] PHP xapian.so size and build times

Olly Betts olly at survex.com
Thu Oct 21 14:22:00 BST 2004


I wrote:
> Depending how much of the difference is optimisation and how much is
> debug, perhaps we should modify configure so -g isn't passed by default
> but only if configure is run with --enable-debug.  I'll give that a
> go and see.

I did some further tests, building with different optimisation levels.
Same box and compiler as before.

Summary - debugging adds a couple of seconds to the build time, so it's
not worth worrying about.  None of the optimisation levels I tried
produce a significantly bigger .so (especially not after stripping).

Don't pay too much attention to the real time - the box wasn't totally
idle (but generally it was lightly loaded); user+sys is more meaningful.

CXXFLAGS=

real    0m59.133s
user    0m53.680s
sys     0m2.510s

Size of .so (unstripped, then stripped):  928716  874892

CXXFLAGS=-O0 -g

real    0m58.149s
user    0m55.940s
sys     0m2.630s

Size of .so (unstripped, then stripped): 1356040  874892

CXXFLAGS=-O1 -g

real    5m20.105s
user    5m13.010s
sys     0m5.870s

Size of .so (unstripped, then stripped): 1769864  745836

CXXFLAGS=-O2 -g

real    7m6.680s
user    6m47.590s
sys     0m8.100s

Size of .so (unstripped, then stripped): 1987134  789964

CXXFLAGS=-O3 -g

real    7m21.029s
user    7m9.850s
sys     0m7.580s

Size of .so (unstripped, then stripped): 2450923  793676

CXXFLAGS=-Os -g

real    7m6.926s
user    6m53.370s
sys     0m7.290s

Size of .so (unstripped, then stripped): 1836916  680236

Cheers,
    Olly



More information about the Xapian-discuss mailing list