To give some brief historical context: values_list has been around a LONG
time, so I wouldn't say anyone has consciously designed it with performance
in mind above "it's faster than complete model loading".

The most noticeable thing which your code does not do which an
implementation of values list would need to do is interpreting everything
as the correct data type. It's possible though that you can optimise cases
where no conversions are needed (which is the majority case with postgres).
The code which implements db converters for normal ORM queries attempts to
do this, I'm not sure how similar the code paths for values_list are.

Marc

On 16 November 2015 at 16:29, Tim Graham <timogra...@gmail.com> wrote:

> I don't think there is much database backend specific logic as far as
> values_list() goes, but if you get something working on SQLite and send a
> pull request, we can easily run it on all database backends.
>
> For performance testing, you might find
> https://github.com/django/djangobench/ useful.
>
> On Monday, November 16, 2015 at 10:13:41 AM UTC-5, Cristiano Coelho wrote:
>>
>> Hi, thanks for the response! I have never developed nor ran the django
>> test suite, I can certainly try as you mentioned, I was hoping for anyone
>> that actually implemented values_list to give me a solid reason to not do
>> any change as I'm probably wrong and the current way it is implemented is
>> the fastest approach.
>> I guess I can play with the tests for a while. However I believe the
>> tests will need to be ran against all db backends? Installing all databases
>> will be a little complicated.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/35204d24-5d25-4dad-966b-8a8dea13ca1e%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/35204d24-5d25-4dad-966b-8a8dea13ca1e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMwjO1GxZaaYGmxiXSV4GHGw5veAut9RECxAY2DVqGLEzLYz5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to