#11287: Better performance of the Paginator list
-------------------------------------+--------------------------------------
Reporter: qingfeng | Owner: nobody
Status: closed | Milestone:
Component: Core framework | Version: 1.0
Resolution: invalid | Keywords: Paginator
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------+--------------------------------------
Comment (by kmtracey):
(Alex was faster than me. But I'll post this anyway in case it helps
guide future submissions.)
The comment here:
{{{
#!python
objects = Model1.objects.all()#-->Read all the data, poor performance
}}}
is incorrect. Query sets are lazy, see:
http://docs.djangoproject.com/en/dev/topics/db/queries/#id3
and:
http://docs.djangoproject.com/en/dev/ref/models/querysets/#when-querysets-
are-evaluated
Thus whatever is being proposed seems to be founded on an incorrect
assumption.
For future reference, when proposing something it would be helpful to have
more words describing the problem and solution. `NBPageList` means
nothing to me. What is the NB supposed to signify? Also, patches should
be complete in a single file, not posted as multiple individual diffs.
And if you are proposing a new public interface/class (which seems to be
where this was going), it needs to have some documentation.
--
Ticket URL: <http://code.djangoproject.com/ticket/11287#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---