Re: [PATCH] Precompute string lengths in PerformRadiusTransaction

From: zengman <zengman(at)halodbtech(dot)com>
To: John Naylor <johncnaylorls(at)gmail(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 10:58:00
Message-ID: tencent_02123DD614E78E272ECC556A@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > 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
Hi,

Okay, thank you very much for reminding me. I'll retract this patch.

--
regards,
Man Zeng

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2026-03-25 11:10:08 Re: Lowering the default wal_blocksize to 4K
Previous Message Ed Behn 2026-03-25 10:47:06 Re: access numeric data in module