Re: [PATCH] Precompute string lengths in PerformRadiusTransaction

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: zengman <zengman(at)halodbtech(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Precompute string lengths in PerformRadiusTransaction
Date: 2026-03-25 09:51:26
Message-ID: CANWCAZahqjM9_XVRXpV=M9Y7fDiywUFrXUYpBebvxQxdYj+NSA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 5, 2026 at 9:36 PM zengman <zengman(at)halodbtech(dot)com> wrote:
> I noticed that the `PerformRadiusTransaction` function is invoked in a loop,
> and the function itself contains internal loops that repeatedly call strlen() on the 'passwd' and 'secret' strings.
> While the optimization gain may be minimal, I still think it’s worth making the change —
> we can precompute the lengths of these two strings at the start of the function to eliminate redundant strlen() calls.

Shortly after you posted this, it was decided that we're going to
remove this method entirely:

https://wiki.postgresql.org/wiki/RADIUS

--
John Naylor
Amazon Web Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2026-03-25 10:32:09 Re: VACUUM FULL, CLUSTER, and REPACK block on other sessions' temp tables
Previous Message Peter Eisentraut 2026-03-25 09:34:47 Re: SQL Property Graph Queries (SQL/PGQ)