Skip to content

Conversation

mgu
Copy link
Contributor

@mgu mgu commented Jan 14, 2023

By changing the order in the condition, we can avoid the call to _get_installed_modules at import time (which imports pkg_resources) when the mechanism_type is set to "starlette".

I have validated the change using PYTHONPROFILEIMPORTTIME=1.

Tell me if such a change requires a link to an issue or some testing.

By changing the order in the condition, we can avoid the call to `_get_installed_modules` (which imports `pkg_resources`) when the `mechanism_type` is set to `"starlette"`.
@antonpirker antonpirker enabled auto-merge (squash) January 19, 2023 10:54
@antonpirker antonpirker merged commit f6af7a0 into getsentry:master Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants