Friday, January 30, 2015

Re: Reduce start up time for manage.py

On Friday, 30 January 2015 14:01:17 UTC, Avraham Serour wrote:
I believe putting imports inside functions would slow down execution, it will make the import everytime the function is executed

one could make something like a lazy import, but you would be trading slow startup for slow requests

That is not true. Python imports are always only executed once: if the module already exists in `sys.modules`, it is not loaded again. 
--
DR.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/22833f7f-35b9-4c2b-a028-e60f79e065ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment