Skip to content

Conversation

DavidVujic
Copy link
Owner

@DavidVujic DavidVujic commented Aug 5, 2025

Description

Improving the performance of the poly check command, when doing dists lookups.

This should make the command faster.

Motivation and Context

Distribution lookups (via the importlib builtin) are expensive from a performance perspective. The metadata and files fetching is performing I/O actions. In this PR: caching any already performed lookups for a specific distribution (by the dist name).

How Has This Been Tested?

✅ CI
✅ Local run on a large Polylith monorepo

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

Copy link

sonarqubecloud bot commented Aug 5, 2025

@DavidVujic DavidVujic changed the title Poly check dist lookup performance fix(poly check): dependency/dists lookup lookup performance improvements Aug 5, 2025
@DavidVujic DavidVujic marked this pull request as ready for review August 5, 2025 09:43
@DavidVujic DavidVujic merged commit ec73971 into main Aug 5, 2025
4 checks passed
@DavidVujic DavidVujic deleted the poly-check-dist-lookup-performance branch August 5, 2025 09:45
@DavidVujic DavidVujic changed the title fix(poly check): dependency/dists lookup lookup performance improvements fix(poly check): dependency/dists lookup performance improvements Aug 5, 2025
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