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 d

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 wrote: > On Thu, Aug 5, 2010 at 6:14 PM, OverKrik wrote: > > Hi Jeremy, I will release all my code after finishing the test suite - > > I think, i

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 wrote: > On Thu, Aug 5, 2010 at 4:32 PM, OverKrik wrote: > > I am performing every test 10 times, excluding one fastest and one > > slowest result

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 wrote: > On Thu, Aug 5, 2010 at 5:32 PM, OverKrik wrote: > > I am performing every test 10 times, excluding one fastest and one > > slowest result, res

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 results.

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

2010-08-05 Thread OverKrik
:09 am, Jacob Kaplan-Moss wrote: > On Thu, Aug 5, 2010 at 3:44 PM, OverKrik 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 faster, but for some reaso

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 = user

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 wrote: > On Sat, Jul 31, 2010 at 7:20 AM, OverKrik wrote: > > Hi, I am not having any memory leaks, just checking how much memory > > every part of django use out of interest.(And because

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

2010-07-31 Thread OverKrik
-- > cat /etc/apache2/apache2.conf > > Mysql > == > Configuration > -- > cat /etc/mysql/my.cnf > > 2010/7/31 OverKrik : > > > > > > > Nope, I am testing Django memory usage for different kind of objects, > > and

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

2010-07-31 Thread OverKrik
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 30 jul, 21:04, OverKrik w

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

2010-07-30 Thread OverKrik
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" wrote: > > On Fri, Jul 30, 2010 at 5:59 PM, OverKrik wrote: > > Hi, I've been profiling Djan... > >

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

2010-07-30 Thread OverKrik
xrange(10)] 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 wrote: > On Fri, Jul 30, 2010 at 5:59 PM, OverKrik wrote: > > Hi, I'

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 wrote: > On Fri, Jul 30, 2010 at 5:59 PM, OverKrik wrote: > > Hi, I've been profiling Django to see how much overhead is being added > > by ORM, and found a very st

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

2010-07-30 Thread OverKrik
(max_length = 255, blank = False) uncommenting this doubles used memory On Jul 31, 2:59 am, OverKrik wrote: > 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 misunderstan

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 00

Re: Making Django a bit more AJAX friendly

2009-05-09 Thread OverKrik
47 am, Ramiro Morales wrote: > On Fri, May 8, 2009 at 6:25 AM, 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

Re: Making Django a bit more AJAX friendly

2009-05-09 Thread OverKrik
t; 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 patch to > >

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 ru