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

Olly Betts olly at survex.com
Thu Oct 21 06:24:26 BST 2004


On Wed, Oct 20, 2004 at 11:37:40AM -0400, Mike Boone wrote:
> Regarding the large PHP4 xapian.so file size: I was just copying the PHP4
> xapian.so from the .libs directory to the place I wanted to keep it, but I
> ran the make install-strip and it cut it down to 3.7MB, still double the
> size of the 0.8.1 version, but better than 10MB.

Your numbers don't even slightly agree with mine!

I'm using Debian "unstable" on x86.  My GCC is "version 3.3.5 (Debian
1:3.3.5-1)".

I compared 0.8.1 to CVS HEAD, but nothing relevant to PHP has changed
since 0.8.3 that I can see.

0.8.1 builds in:

real    1m31.251s
user    1m21.220s
sys     0m11.560s

sizes:

-rwxr-xr-x  1 olly olly  856502 Oct 21 05:06 xapian.so*
-rw-r--r--  1 olly olly 1073848 Oct 21 05:06 xapian_wrap.o

stripped size:

-rwxr-xr-x  1 olly olly  811052 Oct 21 05:19 xapian.so*

CVS HEAD builds in:

real    6m57.967s
user    6m46.730s
sys     0m7.410s

sizes:

-rwxr-xr-x  1 olly olly 1987134 Oct 21 03:09 xapian.so*
-rw-r--r--  1 olly olly 2566252 Oct 21 03:09 xapian_wrap.o

stripped size:

-rwxr-xr-x  1 olly olly  789964 Oct 21 05:12 xapian.so*

So I get nothing like 10MB, and CVS HEAD is *smaller* than 0.8.1 once
stripped.

The build *is* a lot slower though.  The main differences between
the builds are that 0.8.3 builds with "-O2 -g" whereas 0.8.1
is unoptimised and without debug. 

So I suspect whatever GCC version you're using produces larger
code with -O2 compared to no optimisation than mine does.

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.

Cheers,
    Olly



More information about the Xapian-discuss mailing list