[Libreoffice] [Proof-of-concept] Drastically speedup the offapi (and oovbaapi) build

Matúš Kukan matus.kukan at gmail.com
Thu Sep 1 18:45:16 PDT 2011


Hi Kendy, Bjoern

On 1 September 2011 10:25, Jan Holesovsky <kendy at suse.cz> wrote:
> Hi Matúš, Bjoern,
>
> I've found a way how to speedup the build of offapi (which is a major
> problem on windows - on my box it takes about 10% of the entire build
> time).  The trick is simple - instead of generating the files one by
> one, several .idl's are treated during one idlc call; something that has
> been there before gbuildization of the module.  Of course, it also
> handles the case when everything is built, and just 1 .idl changes - in
> that case, only that one is rebuilt.
>
That's nice.

> Unfortunately I am heading for vacation, and cannot finish it before I
> go - do you think anybody of you could have a look, please?
>
So, I had a look, it works that way but is not so much faster.

> With the attached patch, the offapi/UnoApi_offapi.mk (and oovbaapi) has
> to change to something like the following; this is of course only part
> of that, the other rules have to be adapted the same way, but that
> should be ~trivial.  Second part of the problem is that idlc have to be
> patched to bail out with != 0 exit value, according to the comments it
> is not the case right now.
>
I was not working on the second part yet and I do not intend to do so.
Could someone else do it?
I have no idea what idlc is anyway.

> Enjoy :-)
>
Well, it took a while, or more. Not so much fun but not really problem.

Bjoern, could you please approve patches?
And how to push them ? First the Kendy's one and then change it?
I have attached just one patch for better reviewing but created two.
(for UnoApiTarget.mk)

Now results.. in offapi:
before:
make -srj 4 => 75s
make -sr => 206s
after:
make -srj 4 => 71s
make -sr => 183s

It's little more interesting for oovbaapi: (make -sr) 49s -> 34s
But that does not take much.

May be for Windows it will be bigger difference but also this is something.

Or is it possible to process even more files at once? Also from
different directories?

And there were side-effects. I have no idea why but I had to add
include directives for a few idl files (also attached).

> Thank you,

You are welcome, thanks for bringing this up.

Matúš
-------------- next part --------------
A non-text attachment was scrubbed...
Name: UnoApiTarget.diff
Type: text/x-patch
Size: 5318 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110902/b191c6d0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-include-missing-header-file.patch
Type: text/x-patch
Size: 2028 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110902/b191c6d0/attachment-0001.bin>


More information about the LibreOffice mailing list