improve lazy loading and resource usage
|Reported by:||Waldemar Kornewald||Owned by:||nobody|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
This is a general problem, but it's particularly noticeable on App Engine. Django loads a lot of modules up-front even if they're not needed. This makes the first request on a new app server instance very slow because the user has to wait for Django to do its imports. This can take five seconds if you also enable the admin UI. The attached patch is the first step towards more lazy loading and it can shave off 0.5-1s if you have a simple app. The following components are loaded on-demand:
- most of the file upload handling code (that can still be improved, though)
Overall, I think it's 42 modules less for very simple sites.
Personally, I'd like to see Django as a more serious alternative to small frameworks and REST solutions because I love the ORM, but there's too much overhead for simple sites that only use a small fraction of Django's features. Independent of that, I think Django's resource usage should be improved, anyway.
Change History (11)
comment:9 Changed 5 years ago by
|Status:||new → closed|