Re: Speed up clean meson builds by ~25%

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Andres Freund <andres(at)anarazel(dot)de>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: Speed up clean meson builds by ~25%
Date: 2024-04-08 08:02:18
Message-ID: a52065e0-799c-4f7a-a39f-21966ef0e330@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05.04.24 18:19, Jelte Fennema-Nio wrote:
> On Fri, 5 Apr 2024 at 17:24, Andres Freund <andres(at)anarazel(dot)de> wrote:
>> I recommend opening a bug report for clang, best with an already preprocessed
>> input file.
>
>> We're going to need to do something about this from our side as well, I
>> suspect. The times aren't great with gcc either, even if not as bad as with
>> clang.
>
> Agreed. While not a full solution, I think this patch is still good to
> address some of the pain: Waiting 10 seconds at the end of my build
> with only 1 of my 10 cores doing anything.
>
> So while this doesn't decrease CPU time spent it does decrease
> wall-clock time significantly in some cases, with afaict no downsides.

I have tested this with various compilers, and I can confirm that this
shaves off about 5 seconds from the build wall-clock time, which
represents about 10%-20% of the total time. I think this is a good patch.

Interestingly, if I apply the analogous changes to the makefiles, I
don't get any significant improvements. (Depends on local
circumstances, of course.) But I would still suggest to keep the
makefiles aligned.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-04-08 08:03:59 pgsql: Fix the intermittent buildfarm failures in 040_standby_failover_
Previous Message Alexander Lakhin 2024-04-08 08:00:00 Re: Speed up clean meson builds by ~25%