From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Remove repeated calls to PQserverVersion |
Date: | 2021-07-13 23:57:27 |
Message-ID: | CAHut+Pt6bTjEHNbT3PiDm8geK6bLUqS5uPsV+dHdA9CXcucMtQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jul 14, 2021 at 12:15 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Michael Paquier <michael(at)paquier(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2021-07-14 00:18:35 | Re: proposal: possibility to read dumped table's name from file |
Previous Message | Jacob Champion | 2021-07-13 23:52:10 | Re: [PATCH] Pull general SASL framework out of SCRAM |