Re: Really slow performance on webfaction
Thanks for the help guys. I started trying to log things, and only then did I notice that I'd missed the obvious - one of the few queries was taking 11s! Turns out it was a pointless join from a weird use of queries (a queryset contructed one place with more filters added elsewhere in an odd order). Also turns out that, as expected, it was a case of having a much smaller set of test data on my dev server, so it wasn't all that slow on there. Fixed (I hope - its now loading in at most 2s, disappointingly it still doesn't seem to make much odds whether it hits the cache or not...) by just making the query a bit more sane. I suspect there's a few more places where I can improve on similar things that just aren't causing such a headache because the data set isn't so big for a different model. Thanks, Pete -- 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.
Re: Really slow performance on webfaction
Are you running with the same data set both places? The biggest speed problem I ever had in deployment was because real data blew the database up with a huge join. My dummy data on the test box didn't evoke it. (Fix was to get a simple query set and loop over it so that another query could be qualified without a m2m join). Bill On Tue, Sep 28, 2010 at 12:12 PM, Shawn Milochikwrote: > Do you see anything at all like this if you run your app from your > development box? > You can always use the Python debugger to trace for your code and look for > bottlenecks. > (Awesome tutorial) http://www.doughellmann.com/PyMOTW/pdb/index.html > Also, put in logging and add log.debug statements in various stages of the > code. From the timestamps you can home in on the trouble spot. > Shawn > > -- > 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. > -- 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.
Re: Really slow performance on webfaction
Do you see anything at all like this if you run your app from your development box? You can always use the Python debugger to trace for your code and look for bottlenecks. (Awesome tutorial) http://www.doughellmann.com/PyMOTW/pdb/index.html Also, put in logging and add log.debug statements in various stages of the code. From the timestamps you can home in on the trouble spot. Shawn -- 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.