[wp-trac] [WordPress Trac] #58317: Refactor determine_locale() for performance

WordPress Trac noreply at wordpress.org
Fri May 26 17:55:55 UTC 2023


#58317: Refactor determine_locale() for performance
--------------------------------------+--------------------------
 Reporter:  Cybr                      |       Owner:  swissspidy
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  6.3
Component:  I18N                      |     Version:  trunk
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------
Changes (by swissspidy):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55862" 55862]:
 {{{
 #!CommitTicketReference repository="" revision="55862"
 I18N: Refactor `determine_locale()` for performance and readability.

 Refactors the function to avoid unnecessary `get_locale()` calls and
 slightly improve performance, while keeping it readable.

 Adds tests.

 Props Cybr, spacedmonkey, swissspidy.
 Fixes #58317.
 }}}

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


More information about the wp-trac mailing list