Re: Is this true. that django really takes a lot of memory?

2009-02-19 Thread Ludvig Ericson
On Feb 18, 2009, at 02:13, Malcolm Tredinnick wrote: > > On Tue, 2009-02-17 at 18:57 -0600, Jeremy Dunck wrote: >> On Tue, Feb 17, 2009 at 6:49 PM, Malcolm Tredinnick >> wrote: >> ... >>> I'd be somewhat against this, I think. It's *very* easy to reuse >>> querysets

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread James Bennett
On Tue, Feb 17, 2009 at 7:49 PM, Malcolm Tredinnick wrote: > I'd be somewhat against this, I think. It's *very* easy to reuse > querysets and inadvertently cause extra database queries. Unless you're > using really huge querysets, the memory usage is not going to kill

Warning on multiple calls to QuerySet.iterator() (was Re: Is this true. that django really takes a lot of memory?)

2009-02-17 Thread Malcolm Tredinnick
On Tue, 2009-02-17 at 19:25 -0600, Jeremy Dunck wrote: > On Tue, Feb 17, 2009 at 7:13 PM, Malcolm Tredinnick > wrote: > ... > >> if settings.DEBUG and self.prior_iteration: > >>warnings.warn("dope!") > > > > This certainly sounds reasonable and doable today without

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Jeremy Dunck
On Tue, Feb 17, 2009 at 7:13 PM, Malcolm Tredinnick wrote: ... >> if settings.DEBUG and self.prior_iteration: >>warnings.warn("dope!") > > This certainly sounds reasonable and doable today without any real > overhead. Go ahead and make a patch/ticket. OK. Do you

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Malcolm Tredinnick
On Tue, 2009-02-17 at 18:57 -0600, Jeremy Dunck wrote: > On Tue, Feb 17, 2009 at 6:49 PM, Malcolm Tredinnick > wrote: > ... > > I'd be somewhat against this, I think. It's *very* easy to reuse > > querysets and inadvertently cause extra database queries. > ... > > we're

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Jeremy Dunck
On Tue, Feb 17, 2009 at 6:49 PM, Malcolm Tredinnick wrote: ... > I'd be somewhat against this, I think. It's *very* easy to reuse > querysets and inadvertently cause extra database queries. ... > we're trading memory > usage for speed and ease of use (and providing a

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Malcolm Tredinnick
On Tue, 2009-02-17 at 15:20 -0600, Jeremy Dunck wrote: > On Tue, Feb 17, 2009 at 3:15 PM, Jeremy Dunck wrote: > ... > > {% for question in poll.questions.all.iterator %} > > works just fine. > > > > OK, last one from me. > > As a 2.0 wish, I'd like to make .iterator the

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Ian Kelly
On Tue, Feb 17, 2009 at 3:00 PM, Jeremy Dunck wrote: > > On Tue, Feb 17, 2009 at 3:52 PM, James Bennett wrote: >> >> On Tue, Feb 17, 2009 at 7:40 AM, NitinHayaran wrote: >>> Today i read this article and was wondering whether

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Jeremy Dunck
On Tue, Feb 17, 2009 at 3:52 PM, James Bennett wrote: > > On Tue, Feb 17, 2009 at 7:40 AM, NitinHayaran wrote: >> Today i read this article and was wondering whether django orm is >> really that bad. >> >>

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Jeremy Dunck
On Tue, Feb 17, 2009 at 3:15 PM, Jeremy Dunck wrote: ... > {% for question in poll.questions.all.iterator %} > works just fine. > OK, last one from me. As a 2.0 wish, I'd like to make .iterator the default behavior, and the cached-version a special case. I realize this point

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Jeremy Dunck
On Tue, Feb 17, 2009 at 2:11 PM, Alex Gaynor wrote: ... > > Neither is completely correct ;). Both do chunked reads from the > DB(__iter__ using iterator for getting the data), however __iter__ also > caches them, so if you reiterate you don't do a second db query,

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Jeremy Dunck
On Tue, Feb 17, 2009 at 3:12 PM, Jeremy Dunck wrote: > Even so, it seems like it'd be useful to have a built-in filter which > uses iter(object)? > > {% for question in poll.questions.all()|iterate %} Ugh. Sorry, I'm an idiot. {% for question in poll.questions.all.iterator

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Alex Gaynor
On Tue, Feb 17, 2009 at 1:50 PM, Ian Kelly wrote: > > On Tue, Feb 17, 2009 at 7:40 AM, M N Islam Shihan > wrote: > > > > Hi, > > > > Please go through the comments of the blog post you are referring and > you'll > > understand why, how and where to use

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Ian Kelly
On Tue, Feb 17, 2009 at 7:40 AM, M N Islam Shihan wrote: > > Hi, > > Please go through the comments of the blog post you are referring and you'll > understand why, how and where to use the django ORM. > > Regards, > Shihan Something I've just noticed here. One of the

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread M N Islam Shihan
Hi, Please go through the comments of the blog post you are referring and you'll understand why, how and where to use the django ORM. Regards, Shihan - Original Message - From: "NitinHayaran" To: "Django developers" Sent:

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Philippe Raoult
Hi, I did a reply on the post. Might be some time before it's approved. The gist is that yes it's that bad if you're using it naively. As long as you know what's gonna be loaded from the DB you can avoid those cases pretty easily. You can also check

Re: Is this true. that django really takes a lot of memory?

2009-02-17 Thread Jeremy Dunck
On Tue, Feb 17, 2009 at 6:40 AM, NitinHayaran wrote: > > Hi All, > Today i read this article and was wondering whether django orm is > really that bad. > > http://dayhacker.blogspot.com/2009/02/why-django-orm-sucks-it-takes-hell-lot.html > > I think this is the right

Is this true. that django really takes a lot of memory?

2009-02-17 Thread NitinHayaran
Hi All, Today i read this article and was wondering whether django orm is really that bad. http://dayhacker.blogspot.com/2009/02/why-django-orm-sucks-it-takes-hell-lot.html I think this is the right place to ask? --~--~-~--~~~---~--~~ You received this message