Re: Speed up clean meson builds by ~25%

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Speed up clean meson builds by ~25%
Дата
Msg-id 3889130.1712706243@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Speed up clean meson builds by ~25%  (Andres Freund <andres@anarazel.de>)
Ответы Re: Speed up clean meson builds by ~25%  (Andres Freund <andres@anarazel.de>)
Re: Speed up clean meson builds by ~25%  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2024-04-09 19:00:41 -0400, Tom Lane wrote:
>> Andres Freund <andres@anarazel.de> writes:
>>> Why are strduping all of these?

>> IIRC, the issue is that the mechanism for concatenating the tokens
>> back together frees the input strings

> Ah, that explains it - but also seems somewhat unnecessary.

I experimented with replacing mm_strdup() with

#define mm_strdup(x) (x)

As you did, I wasn't trying to get to a working result, so I didn't do
anything about removing all the free's or fixing the cast-away-const
warnings.  The result was disappointing though.  On my Mac laptop
(Apple clang version 15.0.0), the compile time for preproc.o went from
6.7sec to 5.5sec.  Which is better, but not enough better to persuade
me to do all the janitorial work of restructuring ecpg's
string-slinging.  I think we haven't really identified the problem.

As a comparison point, compiling gram.o on the same machine
takes 1.3sec.  So I am seeing a problem here, sure enough,
although not as bad as it is in some other clang versions.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: wal_consistemcy_checking clean on HEAD
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: post-freeze damage control