[wp-trac] [WordPress Trac] #17128: POMO library performance considerations
WordPress Trac
wp-trac at lists.automattic.com
Fri Jan 13 21:54:25 UTC 2012
#17128: POMO library performance considerations
-------------------------+------------------
Reporter: wet | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.4
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------
Changes (by Chouby):
* cc: Chouby (added)
Comment:
I observed the same issue.
Please correct me if I am wrong, but it looks like every internationalized
strings are loaded on every page. Loading the complete mo file on every
page could explain such huge difference of performance between English and
localized versions. Moreover, as WorPress is growing, the mo file is
growing too (for de_DE.mo, it was 296 ko for 2.8, 386 ko for 3.0 and 435
ko now), so this performance issue is growing too.
So if my assumption is good, the most optimized solution could be to load
only the strings needed for the current page. I am not a specialist of the
pomo structure, but I imagine that in the worst case it could mean
splitting the current mo file in many small files. Obviously it would be
difficult to do and maintain.
However, it may be a good solution to split the current mo file in two.
One small file for the frontend and the big file for the admin side (it
seems to me that there are not a lot of core strings displayed on the
frontend). Maybe it would be necessary to load both files on the admin
side. I am not sure.
This way, of course, we do not improve the time running on the admin side
but we should improve a lot the time running on the frontend. Since, inn
most cases, the frontend is loaded much more times than the admin, the
server load decrease should be quite perceptible...
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17128#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list