Why is each thread's database connection closed after each request? Opening a database connection is expensive; it's taking 150ms. Even 10ms would be far too much, for a request that otherwise takes only 30ms. Django threads are reused in FastCGI, and database connections are reusable; why do threads not reuse their database connections?
Disabling django.db.close_connection fixes this, bringing a trivial request from 170ms to 35ms after the first. 150ms to localhost also seems grossly expensive, and I'm still investigating that. However, even if I bring it down to 10ms, that's still spending 25% of the time for the request on something that shouldn't be necessary at all. -- Glenn Maynard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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 -~----------~----~----~----~------~----~------~--~---