Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

double best_compatible_tag_index call ? #160

Open
Carreau opened this issue Nov 22, 2024 · 1 comment
Open

double best_compatible_tag_index call ? #160

Carreau opened this issue Nov 22, 2024 · 1 comment

Comments

@Carreau
Copy link
Contributor

Carreau commented Nov 22, 2024

I think best_compatible_tag_index is called twice for each wheel in find_wheel;

Indeed, find_wheel calls it directly, but best_compatible_tag_index is also directly used by the various static method returning ProjectInfos, via the ProjectInfo._compatible_only(name, releases) -> ._compatible_wheels -> is_package_compatible -> best_compatible_tag_index(..) is not None.

I think it is likely possible to cache, or carry the tag index along and avoid computing it twice.

@ryanking13
Copy link
Member

I think it is likely possible to cache,

caching sound good to me.

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

No branches or pull requests

2 participants