Hi everyone, When I was first experimenting with Django on my local machine with the bundled webserver, one of the things I was really impressed by was the speed — everything was instantaneous. Listing things in the DB, modifying and saving changes etc...
I finally decided to deploy the beginnings on my app on my remote server using the Apache/mod_python setup described in the docs. Everything works fine, but sometimes things are just slooow. Now, I know that things are going to be slower on a remote site, but I'm seeing things like a generic view rendering a <15 line static HTML file sometimes taking 5 seconds to begin the response (i.e. before the browser has loaded anything like images). Now that's not the norm, but I'm averaging about a second or so for my HTML file. My site is hosted by Slicehost which is generally pretty fast. Not to compare the two, but my original PHP version of the site which -is- hitting the database averages about 150 - 200 ms for initial page load. The entire page generally loads before Django even begins to return my page. I installed the debug toolbar, and the one thing that stuck out to me is that SQL queries are taking longer than I'd expect. For example this line — SELECT `auth_user`.`id`, `auth_user`.`username`, `auth_user`.`first_name`, `auth_user`.`last_name`, `auth_user`.`email`, `auth_user`.`password`, `auth_user`.`is_staff`, `auth_user`.`is_active`, `auth_user`.`is_superuser`, `auth_user`.`last_login`, `auth_user`.`date_joined` FROM `auth_user` WHERE `auth_user`.`username` = admin took a half second to complete. If I run it from the command line, the result is always instantaneous. (I had to quote "admin" for MySQL otherwise it wouldn't run.) But this isn't the whole story. For my generic view example "SELECT `auth_message`.`id`, `auth_message`.`user_id`, `auth_message`.`message` FROM `auth_message` WHERE `auth_message`.`user_id` = 1" is the only query that's run and it takes 168 ms, yet the page took 3.07s before initial page load. Help? Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---