Re: Improving prep_buildtree used in VPATH builds - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Improving prep_buildtree used in VPATH builds
Date
Msg-id 1290170105-sup-6345@alvh.no-ip.org
Whole thread Raw
In response to Re: Improving prep_buildtree used in VPATH builds  (Greg Smith <greg@2ndquadrant.com>)
Responses Re: Improving prep_buildtree used in VPATH builds
List pgsql-hackers
Excerpts from Greg Smith's message of vie nov 19 01:52:34 -0300 2010:

> I'd think that if configure takes 
> longer than it has to because the system is heavily loaded, the amount 
> compilation time is going to suffer from that would always dwarf this 
> component of total build time.  But if this was slow enough at some 
> point to motivate you to write a patch for it, maybe that assumption is 
> wrong.

What if instead of -depth you do something like 
find the_args | sort -r
?  If you find a way to filter out the "parents" that you know have
already been created, you could also cut down on the number of mkdir -p
calls, which could result in a larger speedup.  And maybe we should
remove the test -d.  Also, the `expr` call could be substituted by
${item##$sourcedir}, which is supposed to be a POSIX shell feature
according to 
http://www.unix.org/whitepapers/shdiffs.html and
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html

In short, there are plenty of optimization opportunities for this script
without having to involve nonstandard constructs.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Fate of the old cvs repository
Next
From: "Kevin Grittner"
Date:
Subject: Re: Changes to Linux OOM killer in 2.6.36