[wp-trac] [WordPress Trac] #26638: [Patch] Performance Increase in l10n (9-12%)

WordPress Trac noreply at wordpress.org
Mon Dec 16 10:04:09 UTC 2013


#26638: [Patch] Performance Increase in l10n (9-12%)
-------------------------+------------------------------
 Reporter:  dshafik      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  I18N         |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by nacin):

 The domain `default` is the WordPress domain. See also
 load_default_textdomain(). If you downloaded, say, the Spanish language
 pack from es.wordpress.org, nothing will get translated.

 The instantiation of the object only happens once, and it's light, so
 that's not a big deal. I agree that avoiding the function calls would be
 nice. If it consulted $l10n directly instead of calling
 get_translations_for_domain() and then did `if ( $l10n['default']
 instanceof NOOP_Translations )` (and if true, bypassed the second function
 call), I think we'd get most of the benefits here without sacrificing the
 translation aspects.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26638#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list