Bug 690298 - gs 8.64 binary is 3X larger than gs 8.63
Summary: gs 8.64 binary is 3X larger than gs 8.63
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Regression (show other bugs)
Version: 8.64
Hardware: PC Linux
: P4 normal
Assignee: Default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-19 15:33 UTC by William Bader
Modified: 2009-02-19 21:30 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description William Bader 2009-02-19 15:33:42 UTC
I built gs from source on Fedora 8 Linux on an Intel Core2Duo CPU.
I used the same procedures to build gs8.64 as before (with the exception of
using "base" instead of "src").
The data space is much larger.  Was a declaration or initialization changed?
$ ls -l gs8.63/gs.lin gs8.64/gs.lin 
-rwxrwxrwx 1 william users  3386464 2009-01-23 11:59 gs8.63/gs.lin
-rwxrwxrwx 1 william users 10779000 2009-02-19 23:58 gs8.64/gs.lin
$ size gs8.63/gs.lin gs8.64/gs.lin 
   text    data     bss     dec     hex filename
3329761   31256    3808 3364825  3357d9 gs8.63/gs.lin
3426993 7325368   12608 10764969         a442a9 gs8.64/gs.lin
$ file gs8.63/gs.lin gs8.64/gs.lin 
gs8.63/gs.lin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
gs8.64/gs.lin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
$ ldd gs8.63/gs.lin | wc -l
13
$ ldd gs8.64/gs.lin | wc -l
13
Comment 1 Ralph Giles 2009-02-19 16:11:10 UTC
Surprising. Are you sure you used the same build configuration? I get 13 MB for
8.64 vs 10 MB for 8.63 on my x86_64 linux system. With --disable-compile-inits,
my 8.63 build is 7 MB. Can you reproduce the 3.4 MB size?

The included font set is a little bigger in 8.64, but not enough to explain the
difference you're seeing.
Comment 2 William Bader 2009-02-19 17:55:51 UTC
Thanks!
I build with my own script.
The problem was that the default for COMPILE_INITS changed with gs8.64.
$ diff gs8.63/src/unix-gcc.mak gs8.64/base/unix-gcc.mak | grep COMPILE_INITS
< COMPILE_INITS=0
> COMPILE_INITS=1
I added COMPILE_INITS=0 to my make command line, and the size went down.
$ ls -l gs8.63/gs.lin gs8.64/gs.lin
-rwxrwxrwx 1 william users 3386464 2009-01-23 11:59 gs8.63/gs.lin
-rwxrwxrwx 1 william users 3483420 2009-02-20 02:41 gs8.64/gs.lin
I reread the change logs, and I see that this is documented:
2009-01-27T20:43:37.567128Z Ralph Giles
Update documentation on the COMPILE_INITS makefile variable.
In particular, it's normally no longer 0.
Comment 3 Ralph Giles 2009-02-19 21:30:44 UTC
Ok, glad that explains the discrepancy.