#32174: Error page can sometimes be very slow
------------------------------------------------+------------------------
               Reporter:  boxed                 |          Owner:  (none)
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Error reporting       |        Version:  3.1
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 I hit a case in development today where the error page took over 20
 seconds to render. After a bit of digging it happened for a few reasons:

 - fairly deep call chain (20)
 - the same arguments being passed down many levels
 - those arguments contained querysets
 - the querysets had reprs that accessed a related object

 These things in combination resulted in almost 5000 database accesses.

 I have a patch for this that can avoid this. It's pretty simple as the
 debug pretty printer goes through the entire stack in one for loop so it's
 easy to cache the sub-results.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32174>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/048.4f9fc035b3e266e452735ff93e8ff975%40djangoproject.com.

Reply via email to