Hi,

Just one thing I have found in your build script is use of ccache.

Nguyen Vu Hung wrote:
export CCACHE_DIR="/tmp/DEV300_m40.ccache"
ccache -M 6G -F 100000
export CC="ccache gcc"
export CXX="ccache g++"
#export CC="gcc"
#export CXX="g++"


http://wiki.services.openoffice.org/wiki/Building_OpenOffice.org
says in the section "ccache" that

====
If possible, it is strongly recommended to install (and configure) ccache -
this will greatly reduce build time on subsequent builds.
====

Look at the word "subsequent" !

What we could learn here are:

 - ccache will greatly reduce build time on the *subsequent* builds.

 - ccache could take much time more than without ccache at the first build
   since ccache needs to duplicate compilation result files into cache directory
   and the act of writing files into disk sometimes blocks an act of reading
   files which are required to do the compilation of the next file.

In Nguyen's case, you modified options of ./configure several times, ccache
helped a lot, I think. In my case, however, I simply run through a build
process without any fatal error. If I build with ccache, it might take much
time than without ccache.

The most important factor to reduce build time is the amount of memory,
I guess. How to reduce disk access might be the key point. A plenty memory
could act as a disk cache and consequently the amount of disk access could
decrease.

For example, in my case, sequentially building DEV300_m41 for two languages -
English and Japanese, not to mention, including moz, binfilter, ... - takes
just only 4 hour 40 minutes on a system of Core 2 Duo 3.16GHz, 4GB memory,
Solaris Express.

'time' bash-built-in command reported
====
real    282m31.425s
user    204m5.448s
sys     43m27.166s
====
There were a deficit of 35 minutes (282 - (204 + 43)) to wait for something.

The 'solver' directory occupies 750MB. Files in it are most frequently and
repeatedly accessed during build process. Therefore, natively disk-caching
most of them by UNIX kernel might be one of the important factors, i guess.

The size of the entire DEV300_m41 directory reaches 11GB when the build
process is finished. If I have a chance to use a system with 8GB memory, I
would try to measure build time again.


http://ccache.samba.org/ccache-man.html
====
HISTORY
ccache was inspired by the compilercache shell script script written by
Erik Thiele and I would like to thank him for an excellent piece of work.
See http://www.erikyyy.de/compilercache/ for the Erik's scripts.
====

The author of compilercache, who have invented the original idea, well
describes what is compiler cache. That is a great idea for specific cases.

http://www.erikyyy.de/compilercache/
1.  What is compilercache and Why do I want it ?

So when you try ccache for building OpenOffice.org, understand what is
compiler cache. Have fun!

Tora

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org

Reply via email to