Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


I've done some profiling of LO build and one of the common events is the
spawning of bash and mv (on cygwin).
Another performance investigation (deps and pch) took me
to filter-showIncludes.awk where I found the source of the thousands of mv
spawns.

    close(tempfile)
    movecmd = "mv " tempfile " " depfile
    ret = system(movecmd)

It seems that filter-showIncludes.awk is writing the dependency file .d in
a .tmp file first, then it's renaming it to .d.
Considering that the input is piped from stdin and .d either doesn't exist
or will be overwritten (and is never an input,) the wisdom of writing to a
temp file and then moving is lost on me.

A complete build generates close to 9000 .d files in CxxObject alone.
Spawning processes and doing file I/O in the several thousands are bound to
have a toll.
I've patched filter-showIncludes.awk to write directly to .d and saw no ill
effects.

Anyone see a reason not to write directly into .d?
If no, I'll submit a patch.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.