[Libreoffice] How can I speed up a build?

Norbert Thiebaud nthiebaud at gmail.com
Fri Oct 22 20:37:02 PDT 2010


On Fri, Oct 22, 2010 at 9:15 PM, Mattias Johnsson
<m.t.johnsson at gmail.com> wrote:
> Hello all,
>
> Two (probably idiotic) questions. First, when I refresh my master branch with
>
> ~/loroot $ ga pull -r
>
> and then make via
>
> ~/loroot/rawbuild $ ./autogen.sh --with-num-cpus=5 --without-junit --disable-kde
> ~/loroot/rawbuild $ make
>
> it seems that everything is rebuilt which takes hours, even if only a
> few files have changed. Is there a way to ensure that only changed and
> new files are compiled and linked, so the build process is a lot
> quicker?

It may seems that way, but it you just did make (and not make clean
before) then only thing that the make thought needed rebuilding got
rebuilt
It is possible that the git pull pulled a change to a header that is
used in a lot of place, which would trigger a quasi full rebuild...

>
> Second, although I'm using autogen.sh with the --with-num-cpus=5
> option, it appears that only one cpu is being utilized. Or possibly
> two at most - when I look at the output of "top" during the build, at
> most I only ever see one "cc1plus" process and one "dmake" process,
> and dmake is never using more that 1% of a cpu. Any thoughts?
>

Try to used --with-max-jobs=4. I found that parralelising the jobs is
more effective that parralelising the number of compile per job.
I run with 6 and 6 on a 8 core system...

Another thing that may help is ccache. That won't help the first time,
but it does help a lot on later rebuild... especially if you have to
do a make clean && make, which is needed sometimes, unfortunatly.

Norbert


> Cheers,
> Mattias
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>


More information about the LibreOffice mailing list