Re: [Django] #17892: Calling RegexURLResolver.__repr__ takes a lot of time (and memory)

2012-09-01 Thread Django
#17892: Calling RegexURLResolver.__repr__ takes a lot of time (and memory)
-+--
 Reporter:  milosu   |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (URLs)  |  Version:  1.4-beta-1
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--
Changes (by Claude Paroz ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [28fd876bae15df747d164dcae229840d2cf135ca]:
 {{{
 #!CommitTicketReference repository=""
 revision="28fd876bae15df747d164dcae229840d2cf135ca"
 Fixed #17892 -- Do not include whole RegexURLPattern lists in
 RegexURLResolver repr

 Thanks milosu for the report and the initial patch.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #17892: Calling RegexURLResolver.__repr__ takes a lot of time (and memory)

2012-03-13 Thread Django
#17892: Calling RegexURLResolver.__repr__ takes a lot of time (and memory)
-+--
 Reporter:  milosu   |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (URLs)  |  Version:  1.4-beta-1
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+--
Changes (by jezdez):

 * needs_docs:   => 0
 * needs_better_patch:   => 0
 * severity:  Release blocker => Normal
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #17892: Calling RegexURLResolver.__repr__ takes a lot of time (and memory)

2012-03-13 Thread Django
#17892: Calling RegexURLResolver.__repr__ takes a lot of time (and memory)
-+
 Reporter:  milosu   |  Owner:  nobody
 Type:  Bug  | Status:  new
Component:  Core (URLs)  |Version:  1.4-beta-1
 Severity:  Release blocker  |   Keywords:
 Triage Stage:  Unreviewed   |  Has patch:  1
Easy pickings:  0|  UI/UX:  0
-+
 I have an application which has about 70K RegexURLPatterns.

 When I try to access some non-existent url in this app under Django
 1.4RC1, it takes a huge amount of time - I mean 1 or 2 minutes - to
 generate the technical 404 response and also the memory consumption goes
 from 220MB to something about 460MB.

 The problem is in a call to RegexURLResolver.__repr__, which is called
 about 3 times during the technical 404 debug response. It looks like the
 whole RegexURLResolver including all its sub-patterns is being recursively
 traversed during a call to __repr__.

 I had to patch RegexURLResolver.__repr__ to cut this CPU overhead.

 Patch attached, but I'm not sure how to write a test case for it.

 I'm also attaching the profiling results of unpatched Django 1.4RC.

 I'm upgrading from Django 1.2.3 so I'm not sure if this behaviour is
 present in 1.3 or if it is new to 1.4, but from my point of view this is a
 release blocker.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.