Extra mv in filter-showIncludes.awk?
Ashod Nakashian
ashnakash at gmail.com
Thu Jan 22 06:31:27 PST 2015
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150122/f87c5400/attachment.html>
More information about the LibreOffice
mailing list