Re: Querysets with "only()" and "defer()" slower than without?

2010-08-08 Thread OverKrik
Hi Anssi, creating queryset first and reusing it later is a nice idea and I'll add it to my tests, but unfortunately it works only when you can share this queryset between db requests, which is impossible in case of multiply simultaneously requests to server. For example, if you show some profile

Re: Querysets with "only()" and "defer()" slower than without?

2010-08-06 Thread OverKrik
Thanks Jacob, I will continue testing and report if something new on this issue comes out. On Aug 6, 3:50 am, Jacob Kaplan-Moss <ja...@jacobian.org> wrote: > On Thu, Aug 5, 2010 at 6:14 PM, OverKrik <overk...@gmail.com> wrote: > > Hi Jeremy, I will release all my code aft

Re: Querysets with "only()" and "defer()" slower than without?

2010-08-05 Thread OverKrik
Hi Jeremy, I will release all my code after finishing the test suite - I think, in about 2 weeks. On Aug 6, 2:59 am, Jeremy Dunck <jdu...@gmail.com> wrote: > On Thu, Aug 5, 2010 at 4:32 PM, OverKrik <overk...@gmail.com> wrote: > > I am performing every test 10 times, excludin

Re: Querysets with "only()" and "defer()" slower than without?

2010-08-05 Thread OverKrik
t confused, does this mean that only() and defer() should not be used in single-item pk queries? On Aug 6, 1:34 am, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Thu, Aug 5, 2010 at 5:32 PM, OverKrik <overk...@gmail.com> wrote: > > I am performing every test 10 times

Re: Querysets with "only()" and "defer()" slower than without?

2010-08-05 Thread OverKrik
I am performing every test 10 times, excluding one fastest and one slowest result, restarting db every time and performing 10 000 request to warm db before measuring execution time. Just in case, I've tried running tests in only-full-only-full and defer-full-defer-full patters and got same

Re: Querysets with "only()" and "defer()" slower than without?

2010-08-05 Thread OverKrik
oss <ja...@jacobian.org> wrote: > On Thu, Aug 5, 2010 at 3:44 PM, OverKrik <overk...@gmail.com> wrote: > > Hi, I am testing performance of three querysets > > Good! We need as many benchmarks as we can get our hands on. > > > I was expecting first two querysets to be f

Querysets with "only()" and "defer()" slower than without?

2010-08-05 Thread OverKrik
Hi, I am testing performance of three querysets 1. for pk in xrange(1,5): user = User.objects.only("power_level").get(pk = pk) d = user.power_level 2. for pk in xrange(1,5): user = User.objects.defer("name","email","age","info").get(pk = pk) d =

Re: Memory usage depends on number of fields in model, in a strange way

2010-07-31 Thread OverKrik
Jacob, thank you for an excellent explanation. On Jul 31, 7:36 pm, Jacob Kaplan-Moss <ja...@jacobian.org> wrote: > On Sat, Jul 31, 2010 at 7:20 AM, OverKrik <overk...@gmail.com> wrote: > > Hi, I am not having any memory leaks, just checking how much memory > > e

Re: Memory usage depends on number of fields in model, in a strange way

2010-07-31 Thread OverKrik
on > Configuration > -- > cat /etc/apache2/apache2.conf > > Mysql > == > Configuration > -- > cat /etc/mysql/my.cnf > > 2010/7/31 OverKrik <overk...@gmail.com>: > > > > > > > Nope, I am testing Django m

Re: Memory usage depends on number of fields in model, in a strange way

2010-07-31 Thread OverKrik
""" > > What is this actually trying to test? If Python allocation works? > > Yes, you'll start getting all sort of weird memory usage patterns from > the Python VM if you hold references to 10 bogus objects without > garbage collecting in-between. > > On 3

Re: Memory usage depends on number of fields in model, in a strange way

2010-07-30 Thread OverKrik
llocation > patterns for python dicts.  You would see this for any pytho obj with the > right number of fields. > > Alex > > On Jul 30, 2010 7:17 PM, "Jacob Kaplan-Moss" <ja...@jacobian.org> wrote: > > On Fri, Jul 30, 2010 at 5:59 PM, OverKrik <overk..

Re: Memory usage depends on number of fields in model, in a strange way

2010-07-30 Thread OverKrik
and I am using "ps -eo cmd,pcpu,rss" to check memory usage and running this code from manage.py command. As soon as I add name4 memory usage became 2X. On Jul 31, 3:17 am, Jacob Kaplan-Moss <ja...@jacobian.org> wrote: > On Fri, Jul 30, 2010 at 5:59 PM, OverKrik <overk...@gma

Re: Memory usage depends on number of fields in model, in a strange way

2010-07-30 Thread OverKrik
Oh, and I am using latest Django svn but can reproduce this with 1.1 too On Jul 31, 3:17 am, Jacob Kaplan-Moss <ja...@jacobian.org> wrote: > On Fri, Jul 30, 2010 at 5:59 PM, OverKrik <overk...@gmail.com> wrote: > > Hi, I've been profiling Django to see how much overhead is b

Memory usage depends on number of fields in model, in a strange way

2010-07-30 Thread OverKrik
Hi, I've been profiling Django to see how much overhead is being added by ORM, and found a very strange case of memory usage(which is either some kind of bug or me misunderstanding low level stuff) - as long as I have 0 to 3 fields of any type - memory usage is around 45MB ( I create list of 100

Re: Making Django a bit more AJAX friendly

2009-05-09 Thread OverKrik
, Ramiro Morales <cra...@gmail.com> wrote: > On Fri, May 8, 2009 at 6:25 AM, OverKrik <overk...@gmail.com> wrote: > > > Hello, I am working on heavy-AJAX-based website and use firebug alot > > to check responces from server, in case of 500 error Django sends full > > 50

Re: Making Django a bit more AJAX friendly

2009-05-09 Thread OverKrik
com> wrote: > On May 8, 2009, at 11:25, OverKrik wrote: > > > Hello, I am working on heavy-AJAX-based website and use firebug alot > > to check responces from server, in case of 500 error Django sends full > > 500 page which is not very easy to use. I've made a simple patc

Making Django a bit more AJAX friendly

2009-05-08 Thread OverKrik
Hello, I am working on heavy-AJAX-based website and use firebug alot to check responces from server, in case of 500 error Django sends full 500 page which is not very easy to use. I've made a simple patch to provide light version of 500 page in case of ajax request. I know that everybody is in