[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 20:27:24 UTC 2009
#10971: Translate functions when no locale are expensive no-ops
--------------------------+-------------------------------------------------
Reporter: johanee | Owner: westi
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 2.9
Component: Performance | Version: 2.9
Severity: major | Keywords: has-patch
--------------------------+-------------------------------------------------
Changes (by westi):
* owner: => westi
* status: new => accepted
Old description:
> 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!!
New description:
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#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list