Opened 16 months ago
Last modified 16 months ago
#35576 closed Cleanup/optimization
Django too slow on first request — at Version 1
| Reported by: | Sridhar | Owned by: | |
|---|---|---|---|
| Component: | Uncategorized | Version: | 2.2 | 
| Severity: | Normal | Keywords: | Django, Lambda | 
| Cc: | Sridhar | Triage Stage: | Unreviewed | 
| Has patch: | no | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
Description (last modified by )
We have deployed our Django app on lambda, the first request always takes 5-6 seconds excluding lambda cold start times. 
My Observations:
get_app_listandreverse functionstake too long.- The reverse function to prepare and match uri takes O(n).
 - Django adds two URLs for every model we register, so this wait time increases as we add models or write our own rest apis.
 
I am attaching the Cprofile results below.
Change History (2)
by , 16 months ago
| Attachment: | Screenshot from 2024-07-05 10-13-16.png added | 
|---|
comment:1 by , 16 months ago
| Description: | modified (diff) | 
|---|
  Note:
 See   TracTickets
 for help on using tickets.