Skip to content

Use a hand-written parser for entry points.#285

Merged
jaraco merged 5 commits intopython:mainfrom
anntzer:epp
Mar 27, 2021
Merged

Use a hand-written parser for entry points.#285
jaraco merged 5 commits intopython:mainfrom
anntzer:epp

Conversation

@anntzer
Copy link
Copy Markdown
Contributor

@anntzer anntzer commented Feb 23, 2021

This speeds up the entry_points() tox perf check by ~30%, while being
both shorter and easier to follow.

See #283 and discussions linked therein.

This speeds up the `entry_points()` tox perf check by ~30%, while being
both shorter and easier to follow.
@jaraco
Copy link
Copy Markdown
Member

jaraco commented Mar 27, 2021

Thanks for the contrib!

In the subsequent commits, I extracted a separate parser inspired by the optimizations in 4e28868. This new implementation, while more verbose, re-uses itertools.grouper for grouping and provides for a re-usable parser for independent testing and a simple, elegant interface for EntryPoints. The performance gains appear to be comparable in my local testing and in the benchmark results in CI.

@jaraco jaraco merged commit 236cea8 into python:main Mar 27, 2021
@anntzer anntzer deleted the epp branch March 27, 2021 15:14
jaraco added a commit that referenced this pull request Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants