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.
I think best_compatible_tag_index is called twice for each wheel in
find_wheel;Indeed,
find_wheelcalls it directly, butbest_compatible_tag_indexis also directly used by the various static method returningProjectInfos, via theProjectInfo._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.