Reputation: 65
Django takes too much time to load a page. After debugging with the debug tool, I find that it take too much time to send request, is there any advice to enhance the performance? The view includes a Paginator.
After checking the performance with debug-tool:
request: 11855
response: 1
domloading: 1122
dominteractive:12080
Upvotes: 3
Views: 2861
Reputation: 46
You may need check your sql code in Django model or view. It seems that you spend too much time to load information from the server. Consider using select_related method as follows:
Screen.objects.filter(Q(name_icontains=query) | Q(editor_username__icontains=query))\ .select_related("build__id","name")
Upvotes: 1
Reputation: 772
I think you started django project in developer model. Maybe you can use uwsig+nginx. uwsgi : http://uwsgi.readthedocs.org/en/latest/tutorials/Django_and_nginx.html nginx + uwsgi : http://uwsgi.readthedocs.org/en/latest/tutorials/Django_and_nginx.html
Upvotes: 0