[wp-trac] [WordPress Trac] #43096: Reduce redundant calls to translate()

WordPress Trac noreply at wordpress.org
Tue Jan 16 04:22:10 UTC 2018


#43096: Reduce redundant calls to translate()
-------------------------+-----------------------------
 Reporter:  superdav42   |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  I18N         |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:  performance  |
-------------------------+-----------------------------
 Profiling the default WordPress install I noticed translate functions
 where being called 1700+ times and many times with duplicate strings. This
 patch uses static vars in a few key places to avoid translating the same
 string multiple times. Gives about a 14% reduction in page response time
 and a very slight memory increase. See
 https://blackfire.io/profiles/compare/6b2513f0-de36-400d-
 9e39-2349644b3d57/graph

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


More information about the wp-trac mailing list