Hi all,

The patch for this is now ready, as far as I'm concerned, but I'd like
to bring it up here again before committing, mainly because Alex Gaynor
expressed some doubts.

The latest patch is on the ticket:

https://code.djangoproject.com/ticket/16937

It is much longer than before, but mainly because of docs and tests.

Are there any objections to this? Anssi (akaariai) has done a lot of
review of the code, added a bunch of tests and contributed some big
performance improvements (although more could still be done), and
various bugs have been ironed out. To summarise, it now:

 - supports related objects of related objects, to arbitrary depth

 - supports GenericRelation

 - fully supports non-autocreated 'through' models, which
   can have FK to non-PK fields.

 - works as expected with .exists() and .count(), as well
   as .all(), plus any other QuerySet method that gets its
   results from a populated result cache if available.

All of this means that you can see big performance improvements simply
by adding a single prefetch_related() call at the right place.

Anssi is planning further extensions, but I think these should wait
until the main functionality has been adopted.

Regards,

Luke

-- 
"I washed a sock. Then I put it in the dryer. When I took it out,
it was gone."  (Steven Wright)

Luke Plant || http://lukeplant.me.uk/

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to