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

Mike Boone mike at boonedocks.net
Thu Oct 21 14:46:44 BST 2004


Olly, thanks for looking into it some more. I'm not sure why my file sizes
were so big.

I looked up the versions I'm compiling with. This is a Red Hat Enterprise AS
2.1 box.
GCC: 2.96-128.7.2
SWIG: 1.3.21-1
PHP: 4.3.8

How do you record those real/user/sys times?

Here's my xapian-bindings-0.8.3/php4/.libs result, after compiling with the
default settings (like I did for 0.8.1):

-rwxrwxr-x    1 boone    boone    10583062 Oct 19 10:16 xapian.so
-rw-rw-r--    1 boone    boone    14722568 Oct 19 10:16 xapian_wrap.o

The 3.7MB stripped version works OK for me, so for now I'm not worried about
it, but it would be nice to get the small files you're seeing.

Mike.

-----Original Message-----
From: Olly Betts [mailto:olly at survex.com]
Sent: Thursday, October 21, 2004 12:24 AM
To: Mike Boone
Cc: xapian-discuss at lists.xapian.org
Subject: PHP xapian.so size and build times


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