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

Delay initialization of retry hooks #34

Merged
merged 1 commit into from
Oct 21, 2023
Merged

Delay initialization of retry hooks #34

merged 1 commit into from
Oct 21, 2023

Conversation

hynek
Copy link
Owner

@hynek hynek commented Oct 21, 2023

Fixes #31

Is this what you had in mind @ofek?

@hynek hynek force-pushed the delay-instrumentation branch 3 times, most recently from 964c52d to 790f533 Compare October 21, 2023 07:59
@ofek
Copy link

ofek commented Oct 21, 2023

Closer, but structlog is still being imported

@ofek
Copy link

ofek commented Oct 21, 2023

Scratch that, I had to ignore the cache to install. This works and now the important time is spent in tenacity and dataclasses:

❯ python -m timeit -n 1 -r 1 "import stamina"
1 loop, best of 1: 87.8 msec per loop

image

@hynek
Copy link
Owner Author

hynek commented Oct 21, 2023

So, we're good here?

@ofek
Copy link

ofek commented Oct 21, 2023

Yes, thanks!

@hynek hynek merged commit dd5dde9 into main Oct 21, 2023
19 checks passed
@hynek hynek deleted the delay-instrumentation branch October 21, 2023 14:45
@hynek
Copy link
Owner Author

hynek commented Oct 21, 2023

Cool, it's good I tackled it before adding customization to instrumentation otherwise I might've painted myself into a corner.

@hynek
Copy link
Owner Author

hynek commented Oct 23, 2023

Out of curiosity, how did you produce that graph?

@ofek
Copy link

ofek commented Oct 23, 2023

https://github.com/nschloe/tuna

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.

Please modify imports to reduce runtime impact
2 participants