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
