Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7548207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:38:25+00:00 2026-05-30T09:38:25+00:00

I’m trying to track down some performance issues I have had with Django. There

  • 0

I’m trying to track down some performance issues I have had with Django. There seems to be a 600-800 ms delay from the time I click refresh to the time the browser gets a response.

I set up a simple view and the profile middleware and this is the view and results:

the view function:

def test(request):
    return HttpResponse("It works")

The profile results( i used http://www.djangosnippets.org/snippets/186/):

9 function calls in 0.000 CPU seconds

Ordered by: internal time, call count

ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    1    0.000    0.000    0.000    0.000 /usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/http/__init__.py:487(__init__)
    1    0.000    0.000    0.000    0.000 /home/mysite/mysite/mysite/map/views.py:19(test)
    1    0.000    0.000    0.000    0.000 /usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/http/__init__.py:532(__setitem__)
    3    0.000    0.000    0.000    0.000 /usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/http/__init__.py:517(_convert_to_ascii)
    2    0.000    0.000    0.000    0.000 /usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/utils/functional.py:274(__getattr__)
    1    0.000    0.000    0.000    0.000 /usr/lib/python2.6/Cookie.py:573(__init__)
    0    0.000             0.000          profile:0(profiler)


---- By file ----

 tottime
0.0%   0.000 /usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/utils/functional.py
0.0%   0.000 /usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/http/__init__.py
0.0%   0.000 /usr/lib/python2.6/Cookie.py
0.0%   0.000 /home/mysite/mysite/mysite/map/views.py

---- By group ---

  tottime
0.0%   0.000 /usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/utils
0.0%   0.000 /usr/local/lib/python2.6/dist-packages/Django-1.3.1-py2.6.egg/django/http
0.0%   0.000 /usr/lib/python2.6
0.0%   0.000 /home/mysite/mysite/mysite/map

So with that, the profiler isn’t returning any numbers, yet Chrome reports a 647 ms delay from requesting the resource to actually getting any response. My ping time to the server is about 50 ms. Any ideas how I can get better profiling so I can see where in Django is causing this slowdown?

My WSGI config. I’m using Cherokee with uwsgi.

import os
import sys

path = '/home/mysite/mysite/mysite/'
if path not in sys.path:
    sys.path.append(path)



os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

I see this delay(within 20 ms) on different computers as well as different networks. I’m also seeing it when I just use manage.py runserver.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:38:26+00:00Added an answer on May 30, 2026 at 9:38 am

    Django might be slowing down due to several reasons. One of the main reason might be inappropriate or no use of Memcached. Go through the docs to get the idea about the pros and cons of having a cache. You may also find this article useful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.