On Mar 17, 3:11 am, Alexander Schepanovski wrote:
> Can you find that patch and post somewhere?
> If not still thanks for this idea.
Unfortunately, no. Gone with my old laptop.
- Anssi
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To
> I had a patch for this problem somewhere, but can't find it now.
> Basically it added inplace() method to queryset, and after that no
> cloning of the inner query class would happen. The outer QuerySet
> would still be cloned, but that is relatively cheap. This was to
> prevent usage of the old r
On Mar 16, 10:14 am, Thomas Guettler wrote:
> Hi Alexander,
>
> I have seen this in my app, too. It still runs fast enough. But
> I guess the django code could be optimized.
>
I had a patch for this problem somewhere, but can't find it now.
Basically it added inplace() method to queryset, and a
Hi Alexander,
I have seen this in my app, too. It still runs fast enough. But
I guess the django code could be optimized.
Thomas
On 15.03.2011 01:49, Alexander Schepanovski wrote:
> I was optimizing my django app and ran into this. My app was spending
> too much time cloning querysets. I looke
> We haven't yet, but had been planning on exploring a way to mutate the
> existing class in most circumstances, but haven't
> dug into it too much yet.
I have and I use this monkey patch for now: https://gist.github.com/872145
--
You received this message because you are subscribed to the Googl
In our profiling we've also noticed the cloning to be one of the
slowest parts of the app (that and instantiation of model objects).
We haven't yet, but had been planning on exploring a way to mutate the
existing class in most circumstances, but haven't
dug into it too much yet.
On Mar 14, 11:16
> I'd be surprised if the cloning of querysets is actually a
> significant bottleneck relative to the database query itself
I was too.
Query via ORM is 2-4 times slower for me than just database query +
network roundtrip. It is not only due queryset cloning, but cloning
takes 0.5-1 of that 2-4 tim
Hi Alex,
On 03/14/2011 08:49 PM, Alexander Schepanovski wrote:
> Personally, I would like all querysets mutate not clone by default.
> And when one need a clone just make it explicitly.
This is not an option. It will break quite a lot of existing code, and
often in highly confusing ways. You'll n
I was optimizing my django app and ran into this. My app was spending
too much time cloning querysets. I looked into code but didn't find
any simple way to make it faster. But this is not needed actually. In
most use cases "a parent" of a clone is thrown out. So usually one
just need to mutate quer