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

Long import time #73

Open
AlexJMohr opened this issue Nov 5, 2024 · 2 comments
Open

Long import time #73

AlexJMohr opened this issue Nov 5, 2024 · 2 comments

Comments

@AlexJMohr
Copy link

AlexJMohr commented Nov 5, 2024

Importing the klaviyo_api module takes a very long time (up to 2 seconds) even on a fast NVME SSD. See the attached log file, generated from python -X importtime -c 'import klaviyo_api'.

Here is a visualization using tuna:
image

The long import time is very inconvenient while iterating in development.

If the package were to be restructured such that the top-level klaviyo_api module doesn't import everything in openapi_client, import would be much faster.

@dsmcfarl
Copy link

dsmcfarl commented Nov 7, 2024

I can confirm this issue. I experience about 5 second load time. If I have PYTHONTRACEMALLOC=1 env variable set, it takes 26 seconds.

image

with PYTHONTRACEMALLOC=1
image

@vpylypenko-klaviyo
Copy link

Thank you for reaching out and bringing this to our attention. We’re investigating the issue and will update you as soon as we have more information.

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

3 participants