[wp-trac] [WordPress Trac] #10971: Translate functions when no locale are expensive no-ops

WordPress Trac wp-trac at lists.automattic.com
Sun Oct 18 12:52:05 UTC 2009


#10971: Translate functions when no locale are expensive no-ops
--------------------------+-------------------------------------------------
 Reporter:  johanee       |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  2.9      
Component:  Performance   |     Version:  2.9      
 Severity:  major         |    Keywords:  has-patch
--------------------------+-------------------------------------------------
 When there is no locale loaded WordPress creates a new empty Translations
 object on every call to any translation function (__(), ...) which is then
 used to do the fruitless no-op lookup.

 Reverting to the 2.7 style (of testing $l10n[$domain] directly in
 translate() and friends) makes page load of new install of 2.9 trunk front
 page 17% faster!!

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10971>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list