Make WordPress Core

Opened 9 years ago

Last modified 8 years ago

#10971 closed defect (bug)

Translate functions when no locale are expensive no-ops — at Initial Version

Reported by: johanee Owned by:
Milestone: 2.9 Priority: normal
Severity: major Version: 2.9
Component: Performance Keywords: has-patch
Focuses: Cc:


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!!

Change History (1)

9 years ago

Make not translating text much, much faster

Note: See TracTickets for help on using tickets.