Prefetch and avoiding huge IN clauses

2015-09-25 Thread Erik Cederstrand
Hi devs, When prefetching related items for a queryset returning a large amount of items, the generated SQL can be quite inefficient. Here's an example: class Category(models.Model): type = models.PositiveIntegerField(db_index=True) class Item(models.Model): category = models.ForeignKey

Skip IN clause on prefetch queries?

2015-09-25 Thread Erik Cederstrand
Hi devs, My lengthy email to this list about improving performance of prefetch_related() seems to have disappeared. Instead, I created a ticket motivating my need for Prefetch() to be able to tell the prefetched to trust the queryset provided by Prefetch() and not generate a huge and unnecessa

Re: Skip IN clause on prefetch queries?

2015-09-25 Thread Tim Graham
Regarding the "missing message", it's there now. If you are a first-time poster, your mail is held in a moderation queue. On Friday, September 25, 2015 at 6:35:34 AM UTC-4, Erik Cederstrand wrote: > > Hi devs, > > My lengthy email to this list about improving performance of > prefetch_related()

simplifying the install page

2015-09-25 Thread Tim Graham
The install page mentions several different ways to install Django, from pip install (recommended), to `setup.py install`, to symlinking the Django checkout in your site-packages. Do you see any reason to keep the latter methods instead of recommending pip all the time? https://docs.djangoproj

Re: simplifying the install page

2015-09-25 Thread Daniele Procida
On Fri, Sep 25, 2015, Tim Graham wrote: >The install page mentions several different ways to install Django, from >pip install (recommended), to `setup.py install`, to symlinking the Django >checkout in your site-packages. Do you see any reason to keep the latter >methods instead of recommendi

Re: simplifying the install page

2015-09-25 Thread Collin Anderson
Yeah, I bet we could get rid of the entire "Installing an official release manually" section, as I assume we don't actually want to recommend that. Also, the "Installing the development version" section outlines a more manual way already. It makes sense to me to tell people to "install virtualenv"

Re: Some love for admindocs

2015-09-25 Thread Tim Graham
It might be interesting to fork it and develop your vision as a separate project so you can iterate more quickly. At some point we could evaluate whether the existence of an actively maintained external package would allow us to deprecate the version in Django itself (as has been previously pro

Re: simplifying the install page

2015-09-25 Thread Tim Graham
Thanks for the feedback. Here's a proposal: https://github.com/django/django/pull/5360 On Friday, September 25, 2015 at 1:30:15 PM UTC-4, Collin Anderson wrote: > > Yeah, I bet we could get rid of the entire "Installing an official > release manually" section, as I assume we don't actually want

Re: Making the admin compatible with CSP

2015-09-25 Thread Gavin Wahl
I'm very interested in getting this into 1.10. I can devote some time to it to help. When I looked at it before, based on the time I had available, it didn't seem feasible for me to remove every single inline script. Especially with form widgets that include templated javascript. Instead I was