3 level nested prefetch is not working as expected on Django 1.8.x

2016-02-26 Thread Dheerendra Rathor
Posting this from django-users https://groups.google.com/forum/#!topic/django-users/v3KelvexqiI. Three level nested prefetch with custom queryset throws an Attribute Error. > It works perfectly fine on Django 1.9 but I was unable to find release > notes or bug fix notes of the same. > > To rep

Re: should manage.py test run system checks?

2016-02-26 Thread Tim Graham
It looks like about 250 milliseconds for Django's test suite. It's quicker in the case of running an individual test since the checks will be restricted to the application that contains that test. I guess it's fine with me if we proceed with this change. After all, no one complained about in Dj

Re: Cleaning up admin CSS

2016-02-26 Thread Tim Graham
Here is the contributing documentation: https://docs.djangoproject.com/en/dev/internals/contributing/ If you have further questions about contributing feel free to ask in #django-dev IRC or on the django-core-mentorship mailing list. Thanks and I look forward to your contributions. On Friday,

Re: Improving django.setup() and app loading performance

2016-02-26 Thread Florian Apolloner
Hi Collin, On Friday, February 26, 2016 at 10:56:33 PM UTC+1, Collin Green wrote: > > Ugh. As a strong advocate of both django and zappa, I'd love it if we > could keep the conversation on target without degenerating into stack > attacks. If you don't want to weigh in, please feel no obligation

Cleaning up admin CSS

2016-02-26 Thread Martin Whitehouse
Hi all, I'd like to give massive thanks to everyone for the Django project, it's made my life so incredibly simple it's unreal! There are a few things that I'd like to help improve though. To start with, I'd like to clean up the admin CSS to make it valid CSS. Could someone please provide me w

Re: Improving django.setup() and app loading performance

2016-02-26 Thread Collin Green
Ugh. As a strong advocate of both django and zappa, I'd love it if we could keep the conversation on target without degenerating into stack attacks. If you don't want to weigh in, please feel no obligation to do so. I do agree that we could pare down the profile into more actionable sections. I

Re: Improving django.setup() and app loading performance

2016-02-26 Thread Cristiano Coelho
Rich, I believe you know a lot way more than me about AWS Lambda since you have made such a great project, and I'm really interested to know how it really works since theyr documentation is a bit superficial. On their FAQ this is what they state: *Q: Will AWS Lambda reuse function instances?*

Re: Improving django.setup() and app loading performance

2016-02-26 Thread Florian Apolloner
On Friday, February 26, 2016 at 9:53:00 PM UTC+1, Rich Jones wrote: > > @Aymeric > > In my opinion, the first concrete step would be to measure how much time > is spent executing Django code rather than importing Python modules. > > Over 70% of the total request time is spent in django.setup() -

Re: Improving django.setup() and app loading performance

2016-02-26 Thread Rich Jones
@Aymeric > In my opinion, the first concrete step would be to measure how much time is spent executing Django code rather than importing Python modules. You can find a complete profile of a Django request as it goes through the complete request/response loop here: https://github.com/Miserlou/dj

Re: Improving django.setup() and app loading performance

2016-02-26 Thread Cristiano Coelho
If with "serverless" you are talking deployments such as Amazon Lambda or similar, I don't think setup is called on every request, at least for AWS Lambda, the enviorment is cached so it will only happen once each time it needs to scale up. Are there any other issues? El viernes, 26 de febrero

Re: Improving django.setup() and app loading performance

2016-02-26 Thread Aymeric Augustin
Hi Rich, On 26 févr. 2016, at 16:36, Rich Jones wrote: > I'd love to discuss ideas for performance optimizations to Django's setup > method. In my opinion, the first concrete step would be to measure how much time is spent executing Django code rather than importing Python modules. That’s t

Re: Improving django.setup() and app loading performance

2016-02-26 Thread Rich Jones
That might be true in theory.. but in practice? Do any of the core/contrib/top100 apps actually depend on loading orders? I've never encountered that problem before, but I don't know. It seems like we could easily get a 10x performance improvement by doing this in parallel by default, and have

Re: Improving django.setup() and app loading performance

2016-02-26 Thread Tim Graham
I'm not sure we can load apps in parallel -- they are loaded in the order in which they appear in INSTALLED_APPS so the process is consistent. Maybe it would work for some setups, but I guess it would introduce subtle bugs in others. https://docs.djangoproject.com/es/stable/ref/applications/#ho

Improving django.setup() and app loading performance

2016-02-26 Thread Rich Jones
(Originally posted this as a ticket, but we can have discussion here and leave the ticket for just more specific discussion.) I imagine that this is an area that hasn't really been given much consideration with regards to optimization, because it is