On Mar 22, 11:41 pm, TheIvIaxx <theivi...@gmail.com> wrote: > im not about to say my code is prefect :) I'll check out the toolbar > thing. > > my problem though is that timing it to the point where it's completely > out of my hands is .72 sec and then my browser doesn't get byte #1 > until 1.46 sec. There is a big discrepancy and i'm not sure what is > causing it. > > The .72 is after all views have be ran, all DB access has been made, > and templates have been rendered to the HTML. I get my last > time.clock() right before returning the HttpResponse object
Sorry, I misunderstood your first message, when you said your timing was from 'when Django receives the request'. Sounds like you've already done quite a bit of internal profiling. There's still quite a bit to be done after your return the response (presumably you're calling render separately, before your timing call, then returning the finished response afterwards). Most particularly, there's all the response middleware to call - do you have anything there? James Bennett once wrote a great article[1] about exactly how Django deals with a request - as you can see, there's lots to go through even after the view has finished its work. [1]:http://www.b-list.org/weblog/2006/jun/13/how-django-processes- request/ -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.