#35576: Django too slow on first request
-------------------------------------+-------------------------------------
     Reporter:  Sridhar              |                    Owner:  (none)
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Uncategorized        |                  Version:  2.2
     Severity:  Normal               |               Resolution:
     Keywords:  Django, Lambda       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Sridhar:

Old description:

> 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_list` and `reverse functions` take 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.

New description:

 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_list` and `reverse functions` take 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 the Rest APIs.

 I am attaching the Cprofile results below. Let me know if there are any
 ways to optimize this.

--
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35576#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070190820508d8-17278cf0-de5c-4e65-97ef-3779959147d6-000000%40eu-central-1.amazonses.com.

Reply via email to