public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/7] pypi.eclass: performance optimizations
@ 2023-06-13  6:45 Michał Górny
  2023-06-13  6:45 ` [gentoo-dev] [PATCH 1/7] pypi.eclass: Move setting globals to a function Michał Górny
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Michał Górny @ 2023-06-13  6:45 UTC (permalink / raw
  To: gentoo-dev; +Cc: 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
the shopt idea, that is responsible the final big speedup.


-- 
Best regards,
Michał Górny


Michał Górny (7):
  pypi.eclass: Move setting globals to a function
  eclass/tests: Add pypi-bench.sh for global scope logic
  pypi.eclass: Translate version once in the default scenario
  pypi.eclass: Normalize names without subshell
  pypi.eclass: Translate version without subshell in common case
  pypi.eclass: Replace pypi_sdist_url in global scope
  pypi.eclass: Avoid subshell for extglob setting

 eclass/pypi.eclass         | 128 ++++++++++++++++++++++++++-----------
 eclass/tests/pypi-bench.sh |  23 +++++++
 2 files changed, 113 insertions(+), 38 deletions(-)
 create mode 100755 eclass/tests/pypi-bench.sh

-- 
2.41.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-06-13 13:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-13  6:45 [gentoo-dev] [PATCH 0/7] pypi.eclass: performance optimizations Michał Górny
2023-06-13  6:45 ` [gentoo-dev] [PATCH 1/7] pypi.eclass: Move setting globals to a function Michał Górny
2023-06-13  6:45 ` [gentoo-dev] [PATCH 2/7] eclass/tests: Add pypi-bench.sh for global scope logic Michał Górny
2023-06-13  6:45 ` [gentoo-dev] [PATCH 3/7] pypi.eclass: Translate version once in the default scenario Michał Górny
2023-06-13  6:45 ` [gentoo-dev] [PATCH 4/7] pypi.eclass: Normalize names without subshell Michał Górny
2023-06-13  6:45 ` [gentoo-dev] [PATCH 5/7] pypi.eclass: Translate version without subshell in common case Michał Górny
2023-06-13  6:45 ` [gentoo-dev] [PATCH 6/7] pypi.eclass: Replace pypi_sdist_url in global scope Michał Górny
2023-06-13  6:45 ` [gentoo-dev] [PATCH 7/7] pypi.eclass: Avoid subshell for extglob setting Michał Górny
2023-06-13  9:07   ` Ulrich Mueller
2023-06-13 13:37     ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox