Wednesday, January 28, 2015

Reduce start up time for


I'm having a quite large Django project with dozens of apps and many reusable third-party libraries. All the custom management commands (being used with <command>) take a long time to be executed, since the start up sequence takes between 3 and 5 seconds. Using the cProfile module I was able to see that quite a lot of function calls are executed and it looks like that every app is loaded, including its libraries and such before the actual management command is executed. Is there any common way to speed that up (e.g. by not loading apps/libraries that are not required for a specific management command)? Django 1.7+ is used on Python 3.4.

Output from `python3 -m cProfile` (truncated): 1100697 function calls (1064507 primitive calls) in 5.172 seconds

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
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment