@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/django-zappa/files/141600/profile.txt Over 70% of the total request time is spent in django.setup() - so you can see why we have an incentive to improve this! @ Cristiano - > 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? You're halfway there, but the process is more complicated than that. The code is cached, not the internal state of the machine. You can follow our progress here: https://github.com/Miserlou/django-zappa/ But - another type caching could be another possibility. Can anybody think of any arrangements where we could perhaps call setup() with "pre-loaded"/cached applications? -- 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 https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/a7d47b1d-7805-4085-a0d3-b7270c5966d3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.