[wp-trac] [WordPress Trac] #56051: load_textdomain() cached for the better boot-up performance

WordPress Trac noreply at wordpress.org
Thu Jun 23 10:32:31 UTC 2022


#56051: load_textdomain() cached for the better boot-up performance
--------------------------+-----------------------------
 Reporter:  itmapl        |      Owner:  (none)
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Text Changes  |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+-----------------------------
 This is a simple caching strategy for MO files being used for languages
 other than en_US. The en_US causes an exit at that condition
 https://github.com/WordPress/WordPress/blob/master/wp-
 includes/l10n.php#L756 so actually the caching is no needed for this case.

 The caching gives ~21% better (indirect) performance according to the
 tests with results as following (see the comment):
 https://github.com/itma/WordPress/commit/cb1e3d26d436ce5074c4f0064713f6d498f0fa57?fbclid
 =IwAR2oxg6gWuQKkbCGOcdQLzjKiF7yfWeEk2naBR8yoReejs9RN9uJb6Jb-
 qw#commitcomment-76640993

 The files changed are listed here (not too much):

 https://github.com/WordPress/WordPress/pull/600

 Cheers,
 Andrzej

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56051>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list