From: DylanYoung (@DylanYoung) <noreply+DylanYoung@github.com>
To: psycopg/psycopg <noreply+psycopg-psycopg@github.com>
Subject: Re: [psycopg/psycopg] PR #1324: Faster C Load Sequence
Date: Sun, 14 Jun 2026 01:45:06 +0000
Message-ID: <gh-psycopg-psycopg-1324-c4700372817@github.com> (raw)
In-Reply-To: <gh-psycopg-psycopg-1324@github.com>
References: <gh-psycopg-psycopg-1324@github.com>
> On a sidenote - I am surprised that with `set_types` the runtime is worse. Without `set_types` the loader allocation happens on-the-fly, but with a few indirections. I expected the `set_types` tests to be faster - could be a hint that `set_types` itself does something overly explicit?
I suspect this is just a relic of my ad-hoc benchmarking. What really surprises me is the performance degradation of async. I might investigate that.
EDIT: I think the async pessimization is entirely due to the `wait_async` function. I suspect it could be written in Cython for a healthy speedup in all things async.