Re: [gentoo-dev] A problem with updating my key (again)

2023-06-13 Thread Sam James
Andrey Grozin writes: > Hi *, > > My key was going to expire soon. So, as usual, I have prolonged it for > the next year (several days ago). I've sent it to the Gentoo > keyserver. I've checked that the fingerpring of my key in LDAP > coinsides with the fingerprint I see locally. > > Today I've

[gentoo-dev] A problem with updating my key (again)

2023-06-13 Thread Andrey Grozin
Hi *, My key was going to expire soon. So, as usual, I have prolonged it for the next year (several days ago). I've sent it to the Gentoo keyserver. I've checked that the fingerpring of my key in LDAP coinsides with the fingerprint I see locally. Today I've tried to bump dev-lisp/sbcl to

Re: [gentoo-dev] [PATCH 7/7] pypi.eclass: Avoid subshell for extglob setting

2023-06-13 Thread Michał Górny
On Tue, 2023-06-13 at 11:07 +0200, Ulrich Mueller wrote: > > > > > > On Tue, 13 Jun 2023, Michał Górny wrote: > > >  _pypi_normalize_name() { > >   local name=${1} > > - local shopt_save=$(shopt -p extglob) > > - shopt -s extglob > > + local prev_extglob=-s > > + if ! shopt -p extglob

Re: [gentoo-dev] [PATCH 7/7] pypi.eclass: Avoid subshell for extglob setting

2023-06-13 Thread Ulrich Mueller
> On Tue, 13 Jun 2023, Michał Górny wrote: > _pypi_normalize_name() { > local name=${1} > - local shopt_save=$(shopt -p extglob) > - shopt -s extglob > + local prev_extglob=-s > + if ! shopt -p extglob >/dev/null; then > + prev_extglob=-u > +

[gentoo-dev] [PATCH 7/7] pypi.eclass: Avoid subshell for extglob setting

2023-06-13 Thread Michał Górny
Suggested by Eli Schwartz. This gives roughly 5260 ops / s, over 550% speedup. The complete patch series therefore increases the speed from roughly 326 ops / s to 5260 ops / s, making the common case 16 times faster. Closes: https://bugs.gentoo.org/908411 Closes:

[gentoo-dev] [PATCH 6/7] pypi.eclass: Replace pypi_sdist_url in global scope

2023-06-13 Thread Michał Górny
Introduce an internal helper for _pypi_sdist_url that doesn't require subshell, and therefore eliminate all subshells from global scope. We're nearing 952 ops / s, further 39% speedup. Signed-off-by: Michał Górny --- eclass/pypi.eclass | 53 +- 1 file

[gentoo-dev] [PATCH 5/7] pypi.eclass: Translate version without subshell in common case

2023-06-13 Thread Michał Górny
Provide an internal helper to translate versions without a subshell, and use it in the common case. Now the benchmark gives 685 ops / s, which means it's another 28% speedup. Signed-off-by: Michał Górny --- eclass/pypi.eclass | 31 +-- 1 file changed, 21

[gentoo-dev] [PATCH 4/7] pypi.eclass: Normalize names without subshell

2023-06-13 Thread Michał Górny
Provide an internal helper to normalize names without a subshell. This gives 535 ops / s, so a further 44% speedup. Signed-off-by: Michał Górny --- eclass/pypi.eclass | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/eclass/pypi.eclass

[gentoo-dev] [PATCH 3/7] pypi.eclass: Translate version once in the default scenario

2023-06-13 Thread Michał Górny
Instead of translating version two times, once in pypi_sdist_url and then when setting S, do it once and store the result. This gives roughly 371 ops / s, i.e. a 13% speedup. Signed-off-by: Michał Górny --- eclass/pypi.eclass | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-)

[gentoo-dev] [PATCH 2/7] eclass/tests: Add pypi-bench.sh for global scope logic

2023-06-13 Thread Michał Górny
The benchmark yield roughly 327 ops / s on my machine. Signed-off-by: Michał Górny --- eclass/tests/pypi-bench.sh | 23 +++ 1 file changed, 23 insertions(+) create mode 100755 eclass/tests/pypi-bench.sh diff --git a/eclass/tests/pypi-bench.sh b/eclass/tests/pypi-bench.sh

[gentoo-dev] [PATCH 1/7] pypi.eclass: Move setting globals to a function

2023-06-13 Thread Michał Górny
Signed-off-by: Michał Górny --- eclass/pypi.eclass | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/eclass/pypi.eclass b/eclass/pypi.eclass index 13dd56fa4fec..732b0c6184ef 100644 --- a/eclass/pypi.eclass +++ b/eclass/pypi.eclass @@ -221,12 +221,20 @@

[gentoo-dev] [PATCH 0/7] pypi.eclass: performance optimizations

2023-06-13 Thread Michał Górny
Hi, Here's a set of patches that improve performance of pypi.eclass by eliminating the subshells from the most common code paths. It comes with a trivial benchmarking tool that shows roughly 16 times speedup from the changes. Thanks to Sam for bringing the problem up, and to Eli Schwartz for