[wp-trac] [WordPress Trac] #26638: Performance Increase in l10n (9-12%)

WordPress Trac noreply at wordpress.org
Wed Sep 12 03:40:08 UTC 2018


#26638: Performance Increase in l10n (9-12%)
-------------------------------------------------+-------------------------
 Reporter:  dshafik                              |       Owner:  (none)
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:
Component:  I18N                                 |     Version:  2.9
 Severity:  normal                               |  Resolution:  wontfix
 Keywords:  has-patch needs-testing reporter-    |     Focuses:
  feedback dev-feedback                          |  performance
-------------------------------------------------+-------------------------
Changes (by ocean90):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Future Release =>


Old description:

> While doing some writing on profiling I choose Wordpress as my example
> application and wrote a small patch that in my testing boosts performance
> of index.php by 9-12% (with the dataset from my 6 year old blog, ~250
> posts, lots of plugins and extra stuff).
>
> This performance increase is found by making a small change to the way
> `translate()` works, effectively cutting out the use of the
> `NOOP_Translates` class.
>
> Patch is attached.

New description:

 While doing some writing on profiling I choose WordPress as my example
 application and wrote a small patch that in my testing boosts performance
 of index.php by 9-12% (with the dataset from my 6 year old blog, ~250
 posts, lots of plugins and extra stuff).

 This performance increase is found by making a small change to the way
 `translate()` works, effectively cutting out the use of the
 `NOOP_Translates` class.

 Patch is attached.

--

Comment:

 Going to close this as a wontfix for now since the patches don't comply
 with how core loads translations anymore. See #34114 for history.
 Feel free to reopen if someone has a solution which doesn't copy most of
 `get_translations_for_domain()` into each translate function and still has
 a noticeable performance improvement.

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


More information about the wp-trac mailing list