Re: Mingw task for Cirrus CI

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Mingw task for Cirrus CI
Date: 2022-04-09 00:27:58
Message-ID: 20220409002758.GM24419@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 07, 2022 at 10:10:21AM -0700, Andres Freund wrote:
> Hi,
>
> On 2022-04-06 11:03:37 -0400, Andrew Dunstan wrote:
> > On 3/30/22 20:26, Andres Freund wrote:
> > > Could you try using dash to invoke configure here, and whether it makes configure faster?
> > I got weird failures re libxml/parser.h when I tried with dash. See
> > <https://cirrus-ci.com/task/5963254039052288> (It would be nice if we
> > could see config.log on failure.)
>
> Since dash won't help us to get the build time down sufficiently, and the
> tests don't pass without a separate build tree, I looked at what makes
> config/prep_buildtree so slow.
>
> It's largely just bad code. The slowest part are spawning one expr and mkdir
> -p for each directory. One 'cmp' for each makefile doesn't help either.
>
> The expr can be replaced with
> subdir=${item#$sourcetree}
> that's afaics posix syntax ([1]), not bash.
>
> Spawning one mkdir for each directory can be replaced by a single mkdir
> invocation with all the directories. On my linux workstation that gets the
> time for the first loop down from 1005ms to 38ms, really.

Even better?

(cd "$sourcetree" && find . -print |grep -E '/Makefile$|/GNUmakefile$' |grep -v "$sourcetree/doc/src/sgml/images/" |xargs tar c) |
(cd "$buildtree" && tar x)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-04-09 00:59:10 Re: pgsql: Add TAP test for archive_cleanup_command and recovery_end_comman
Previous Message Andres Freund 2022-04-08 23:56:08 Re: pgsql: Add TAP test for archive_cleanup_command and recovery_end_comman