How much does import slow down Django?

What if I import 100 things? (At the top of my views.py)

And then inside each of them I import 30 things.

Will it slow down the job?

+3
source share
2 answers

This will slow down the launch (in fact, no matter what the load for the first time, the file containing these imported files is replaced). Assuming django does not do this for every request, but only once, this is not a problem.

+4
source

Only for the first time they are imported into the process. After that, all that happens is that the link is copied to the local area.

+3
source

Source: https://habr.com/ru/post/1786549/


All Articles