#14290: Rendering is very inefficient when USE_L10N. Caching format values gives
2-7 times improvement
-------------------------------------------+--------------------------------
          Reporter:  teemu                 |         Owner:  jezdez             
     
            Status:  assigned              |     Milestone:  1.3                
     
         Component:  Internationalization  |       Version:  SVN                
     
        Resolution:                        |      Keywords:  localization, 
rendering,
             Stage:  Accepted              |     Has_patch:  1                  
     
        Needs_docs:  0                     |   Needs_tests:  0                  
     
Needs_better_patch:  1                     |  
-------------------------------------------+--------------------------------
Comment (by akaariai):

 Ok, now there is a get_language safe patch for this.

 The performance statistics are as follows, using
 http://localhost:8000/test/10000?timing:

 With this patch, 1,5 seconds on average
  * get_language calls (10000) use about 0.3 seconds of this.
  * smart_str in start of get_format uses 0.15 seconds.
  * the new caching mechanism uses about 0.1 seconds of this.

 Without this patch, about 9 seconds on average.

 With USE_L10N=False, about 0.7 seconds.

 I haven't yet ran the tests, will do that tomorrow.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14290#comment:7>
Django <http://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 post to this group, send email to django-upda...@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.

Reply via email to