Speed up clean meson builds by ~25%

From: Jelte Fennema-Nio <me(at)jeltef(dot)nl>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Speed up clean meson builds by ~25%
Date: 2024-04-04 22:45:20
Message-ID: CAGECzQQg4qmGbqqLbK9yyReWd1g=d7T07_gua+RKXsdsW9BG-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Building the generated ecpg preproc file can take a long time. You can
check how long using:

ninja -C build src/interfaces/ecpg/preproc/ecpg.p/meson-generated_.._preproc.c.o

This moves that file much closer to the top of our build order, so
building it can be pipelined much better with other files.

It improved clean build times on my machine (10 cores/20 threads) from ~40
seconds to ~30 seconds.

You can check improvements for yourself with:

ninja -C build clean && ninja -C build all

Attachment Content-Type Size
v1-0001-Speed-up-clean-parallel-meson-builds-a-lot.patch application/octet-stream 1.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Regina Obe 2024-04-04 22:50:21 RE: Can't compile PG 17 (master) from git under Msys2 autoconf
Previous Message Tom Lane 2024-04-04 22:34:30 Re: Security lessons from liblzma