Hi,
On 2021-10-12 01:37:21 -0700, Andres Freund wrote:
> non-cached build (world-bin):
> current: 40.46s
> ninja: 7.31s
Interestingly this is pretty close to the minimum achievable on my
machine from the buildsystem perspective.
A build with -fuse-ld=lld, which the above didn't use, takes 6.979s. The
critical path is
bison gram.y -> gram.c 4.13s
gcc gram.c -> gram.o 2.05s
gcc postgres .... 0.317
A very helpful visualization is to transform ninja's build logs into a
tracefile with https://github.com/nico/ninjatracing
I attached an example - the trace.json.gz can be uploaded as-is to
https://ui.perfetto.dev/
It's quite a bit of of fun to look at imo.
There's a few other things quickly apparent:
- genbki prevents build progress due to dependencies on the generated
headers.
- the absolutely stupid way I implemented the python2->python3
regression test output conversion uses up a fair bit of resources
- tablecmds.c, pg_dump.c, xlog.c and a few other files are starting to
big enough to be problematic compile-time wise
Greetings,
Andres Freund