Skip to content

Use ThreadPool Executor to fetch packages concurrently#143

Open
atom-andrew wants to merge 1 commit intoFHPythonUtils:masterfrom
atom-andrew:asb/threadpool
Open

Use ThreadPool Executor to fetch packages concurrently#143
atom-andrew wants to merge 1 commit intoFHPythonUtils:masterfrom
atom-andrew:asb/threadpool

Conversation

@atom-andrew
Copy link
Copy Markdown

Purpose of This Pull Request

Speed up checks using a ThreadPool to do work concurrently. This particularly important for use a pre-commit hook, where speed is critical.

Please check the relevant option by placing an "X" inside the brackets:

  • Documentation update
  • Bug fix
  • New feature
  • Other (please explain): Performance

Overview of Changes

Fetch data concurrently.

Related Issue

Reviewer Focus

Additional Notes

Possibly this will cause us to hit rate limits faster. The python gil presumably would prevent this from overloading all the cores on the server so it shouldn't have a system usability impact.

Our pre-commit pipes the output of uv export to this tool. It skips internal packages (they would fail anyway because they all go through a gitlab pypi repo that doesn't support the legacy pypi json api, but that's another story), so there is no need to handle indirection. This would be very fast if requests could be made concurrently, but currently they are not.

@atom-andrew atom-andrew changed the title Use ThreadPool to speed up check Use ThreadPool to fetch packages concurrently Mar 25, 2026
@atom-andrew atom-andrew changed the title Use ThreadPool to fetch packages concurrently Use ThreadPool Executor to fetch packages concurrently Mar 25, 2026
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.

1 participant