Skip to content

Conversation

@heejaechang
Copy link
Collaborator

In importResolver, it already checks if a py.typed file exists before calling getPyTypedInfo, using the file system cache, so there's no need to recheck it inside getPyTypedInfo. This minor improvement results in a 500~1000ms speed boost for certain cases where the py.typed file is checked across many folders, such as in indexer.

It would be beneficial to extend the cache to the file system itself so all code could benefit from it, but for now, the improvement is specific to the importResolver, where the cache exists.

image

vs

image

@github-actions

This comment has been minimized.

@microsoft microsoft deleted a comment from github-actions bot Apr 9, 2024
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2024

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

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.

2 participants