[wp-trac] [WordPress Trac] #32052: Add out of the box support for MO file caching

WordPress Trac noreply at wordpress.org
Thu Sep 8 03:51:16 UTC 2022


#32052: Add out of the box support for MO file caching
-------------------------------------+--------------------------
 Reporter:  nicofuma                 |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  6.1
Component:  I18N                     |     Version:  4.2
 Severity:  normal                   |  Resolution:
 Keywords:  needs-refresh has-patch  |     Focuses:  performance
-------------------------------------+--------------------------

Comment (by swissspidy):

 I think setting the milestone is a bit optimistic/ambitious since there is
 no updated patch nor consensus that this is the best path forward.

 Also quoting this
 [https://wordpress.slack.com/archives/C02KGN5K076/p1644856405360249 Slack
 thread]:

 * Caching was really not worth it either, as plain text files were often
 faster.
 * If you want to really gain performance, and benefit from system caching,
 drop `.mo` files and move to a `.php` file instead. (this approach was
 also suggested by nacin in
 https://core.trac.wordpress.org/ticket/17268#comment:57)
 * “Caching file contents” is not always faster, it might be faster in some
 environments, but when the Object Cache or database server is not on the
 same machine, or is under increased load (like in many shared
 environments) it’s actually much slower than local files.
 * For environments with lots of translations loaded, it can also add
 significant extra network traffic pulling all the translation strings from
 a remote server, when they’re already cached locally on the servers ram -
 where the .mo parsing is actually not at all bad.

 I'd say this needs a more active discussion & tests with different
 implementations before jumping into implementation.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/32052#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list