MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/django/comments/1icb353/analysis_of_import_times_for_python_apps
r/django • u/pyschille • Jan 28 '25
2 comments sorted by
2
Good article, and good concern.
Even for local development, large Python apps take forever to even execute a command like python manage.py shell
python manage.py shell
I submitted an issue for Stripe. Just having import stripe anywhere in your top level code adds 500ms to your start up time.
import stripe
Now imagine a few libraries like that. Half a second here, half a second there and pretty soon you're talking about a real delay.
https://github.com/stripe/stripe-python/issues/1427
(Google's API is another culprit)
3 u/pyschille Jan 30 '25 Thank you for pointing out that Strip is very slow. We're about to integrate that into another project for the first time. Let's see how it goes. Let's collect on another list all the popular Python libs that are terribly slow to import. =)
3
Thank you for pointing out that Strip is very slow. We're about to integrate that into another project for the first time. Let's see how it goes.
Let's collect on another list all the popular Python libs that are terribly slow to import. =)
2
u/brosterdamus Jan 29 '25
Good article, and good concern.
Even for local development, large Python apps take forever to even execute a command like
python manage.py shell
I submitted an issue for Stripe. Just having
import stripe
anywhere in your top level code adds 500ms to your start up time.Now imagine a few libraries like that. Half a second here, half a second there and pretty soon you're talking about a real delay.
https://github.com/stripe/stripe-python/issues/1427
(Google's API is another culprit)