Re: Remove repeated calls to PQserverVersion

Поиск
Список
Период
Сортировка
От Peter Smith
Тема Re: Remove repeated calls to PQserverVersion
Дата
Msg-id CAHut+Pt6bTjEHNbT3PiDm8geK6bLUqS5uPsV+dHdA9CXcucMtQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Remove repeated calls to PQserverVersion  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Remove repeated calls to PQserverVersion
Список pgsql-hackers
On Wed, Jul 14, 2021 at 12:15 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Michael Paquier <michael@paquier.xyz> writes:
> > On Tue, Jul 13, 2021 at 07:02:27PM +1000, Peter Smith wrote:
> >> I found a few functions making unnecessary repeated calls to
> >> PQserverVersion(conn); instead of just calling once and assigning to a
> >> local variable.
>
> > Does it really matter?  PQserverVersion() does a simple lookup at the
> > internals of PGconn.
>
> Yeah, it'd have to be mighty hot code to be worth caring about that,
> and none of these spots look like it could be worth it.

I agree there would be no observable performance improvements.

But I never made any claims about performance; my motivation for this
trivial patch was more like just "code tidy" or "refactor", so
applying performance as the only worthiness criteria for a "code tidy"
patch seemed like a misrepresentation here.

Of course you can judge the patch is still not worthwhile for other
reasons. So be it.

------
Kind Regards,
Peter Smith.
Fujitsu Australia



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

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: [PATCH] Pull general SASL framework out of SCRAM
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: proposal: possibility to read dumped table's name from file