[wp-trac] [WordPress Trac] #43902: Small refactoring to prevent multiple chr() calls in MO class

WordPress Trac noreply at wordpress.org
Mon Apr 30 05:44:27 UTC 2018


#43902: Small refactoring to prevent multiple chr() calls in MO class
-------------------------+------------------------------
 Reporter:  likemusic    |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  I18N         |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  performance
-------------------------+------------------------------

Comment (by ayeshrajans):

 Hi @likemusic - welcome to Wordpress Trac!
 I often go through performance tagged tickets and other PHP-related
 improvements. I'm just a regular volunteer with no commit privileges, so
 please take this just as an observation.

 Here is a benchmark [https://3v4l.org/vkjKg] of the suggested change.
 There doesn't seem to be a noticeable performance difference between two
 approaches. However, it definitely looks like an improvement in code
 clarity, following DRY.

 I believe there is some work undergoing to revamp this component with a
 modern approach. I'm sure someone with more understanding will comment
 soon.

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


More information about the wp-trac mailing list