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

2016-02-29 Thread Rich Jones
Ah, interesting! Thanks for tracking that down. In chat we basically discovered that the intercontinental latency and shoddy wifi connections were responsible for a lot of the confusion. Testing from a US-based fiber connection, we got results of ~40ms in both scenarios. ---

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

2016-02-29 Thread Rich Jones
Hm. This is the downside of cloud services - we cannot look under the hood. Since I think that since this is something we _want_ cached, and because it will make the function being executed shorter in length - it is a good code decision to make. Thank you for the idea! However, it looks like

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

2016-02-29 Thread Rich Jones
That certainly could have something to do with it - there isn't very much transparency about how API Gateway works. It's super new and pretty janky, TBQH. However, I think that the behavior describing is not what's expected - the caching seems to be for the assets of the whole environment, not

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

2016-02-29 Thread Rich Jones
As I suspected, moving setup() outside of the handler had a negligible effect - in fact the test showed a slight drop in performance. :( Testing from httping. From Berlin to US-East-1: Before: --- https://arb9clq9k9.execute-api.us-east-1.amazonaws.com/unicode/json_example/ ping statistics ---

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

2016-02-29 Thread Rich Jones
ppa forum :) > > > > El lunes, 29 de febrero de 2016, 19:34:16 (UTC-3), Rich Jones escribió: >> >> For those who are still following along, these are the lines in question: >> >> >> https://github.com/Miserlou/django-zappa/blob/master/django_zappa/

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

2016-02-29 Thread Rich Jones
this. Suggestions always welcome! R On Monday, February 29, 2016 at 11:26:17 PM UTC+1, Rich Jones wrote: > > Hey all! > > Let me clarify a few of the terms here and describe a bit how Django > operates in this context. > > "Serverless" in this contex

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

2016-02-29 Thread Rich Jones
Hey all! Let me clarify a few of the terms here and describe a bit how Django operates in this context. "Serverless" in this contexts means "without any permanent infrastructure". The server is created _after_ the request comes in, and it dies once the response is returned. The means that we

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:

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

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

Announcing Django-Zappa - Serverless Django on AWS Lambda + API Gateway

2016-02-08 Thread Rich Jones
=plUrbPN0xc8=youtu.be And see the code here: https://github.com/Miserlou/django-zappa Comments, questions and pull requests are welcome! It seems quite performant already, but I bet there are ways that we can improve Django to work better on Lambda. Enjoy, Rich Jones -- You received this message

Re: Sane defaults for Startapp and Startproject

2011-10-25 Thread Rich Jones
Hi Rich, > > On 10/21/2011 10:21 AM, Rich Jones wrote: > > > How would you guys feel about a manage.py startexample > > > which would create an example application? A simple, templated hello > > world with an example model and an example view and an example > >

Re: Sane defaults for Startapp and Startproject

2011-10-21 Thread Rich Jones
How would you guys feel about a manage.py startexample which would create an example application? A simple, templated hello world with an example model and an example view and an example template? R On Oct 20, 4:50 pm, Aymeric Augustin wrote: > On 20 oct.