meson: add and use stamp files for generated headers
От | Andres Freund |
---|---|
Тема | meson: add and use stamp files for generated headers |
Дата | |
Msg-id | cgkdgvzdpinkacf4v33mky7tbmk467oda5dd4dlmucjjockxzi@xkqfvjoq4uiy обсуждение исходный текст |
Ответы |
Re: meson: add and use stamp files for generated headers
|
Список | pgsql-hackers |
Hi, As $subject says, I'd like to introduce stamp files for generated headers. The immediate motivation is that more than half of build.ninja just consists out of repetitions of the list of generated headers (listed as order-only dependencies). That makes invocations of ninja a tad slower and makes meson take a bit longer to generate build.ninja. Without the change: andres@awork3:/srv/dev/build/postgres/m-master-assert$ wc build.ninja 12713 260280 7754708 build.ninja andres@awork3:/srv/dev/build/postgres/m-master-assert$ numactl --physcpubind 11 time ninja reconfigure ... 3.48user 0.29system 0:03.84elapsed 97%CPU (0avgtext+0avgdata 87640maxresident)k 0inputs+41520outputs (0major+71323minor)pagefaults 0swaps andres@awork3:/srv/dev/build/postgres/m-master-assert$ numactl --physcpubind 11 time ninja ninja: no work to do. 0.06user 0.03system 0:00.10elapsed 98%CPU (0avgtext+0avgdata 22496maxresident)k 0inputs+0outputs (0major+5216minor)pagefaults 0swaps With the change: andres@awork3:/srv/dev/build/postgres/m-dev-assert$ wc build.ninja 12733 143627 3376899 build.ninja andres@awork3:/srv/dev/build/postgres/m-dev-assert$ numactl --physcpubind 11 time ninja reconfigure ... 3.14user 0.30system 0:03.53elapsed 97%CPU (0avgtext+0avgdata 74392maxresident)k 0inputs+34576outputs (0major+66026minor)pagefaults 0swaps andres@awork3:/srv/dev/build/postgres/m-dev-assert$ numactl --physcpubind 11 time ninja ninja: no work to do. 0.04user 0.02system 0:00.06elapsed 100%CPU (0avgtext+0avgdata 19332maxresident)k 0inputs+0outputs (0major+4389minor)pagefaults 0swaps My main motivation however is not those, in absolute terms, relatively small speedups, but that I have some patches (LLVM bitcode generation, headerscheck support, compile_commands.json targets for headers) that add more targets depending on all those headers, and that the slowdown becomes more noticeable with those. The improvements with just this patch seems a sufficient improvement on its own, though - hence this thread. It's a bit sad to use python to create the stamp files, it's more than 3x slower than using 'touch' - but touch doesn't work on windows. It's also very hard to imagine a case where creating stamp files is a significant bottleneck, given that e.g. genbki.pl is somewhat expensive. Greetings, Andres Freund
Вложения
В списке pgsql-hackers по дате отправления: