Re: Improving prep_buildtree used in VPATH builds

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Improving prep_buildtree used in VPATH builds
Date: 2010-11-19 12:50:28
Message-ID: 1290170105-sup-6345@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2010-11-19 13:13:45 Re: Changes to Linux OOM killer in 2.6.36
Previous Message Magnus Hagander 2010-11-19 11:25:49 Re: Fate of the old cvs repository