[wp-trac] [WordPress Trac] #37997: Increase in function calls to get_locale() because of _load_textdomain_just_in_time()
WordPress Trac
noreply at wordpress.org
Sat Nov 12 02:32:25 UTC 2016
#37997: Increase in function calls to get_locale() because of
_load_textdomain_just_in_time()
-------------------------------------------------+-------------------------
Reporter: sharkomatic | Owner: ocean90
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.7
Component: I18N | Version: 4.6
Severity: normal | Resolution:
Keywords: needs-testing has-patch has-unit- | Focuses:
tests | performance
-------------------------------------------------+-------------------------
Comment (by jrf):
Just uploaded a proof of concept/potential patch. (doesn't contain any
unit tests for the new methods yet).
Did some quick tests on a relatively standard WP install with only some
debug plugins active.
For a front-end page load, I found the following:
* Without the patch, the `locale` filter was called 2200+ times.
* With the patch, the `locale` filter was only called 72 times.
So independently of whether or not the actual slow-down is caused by
plugins, I do believe the patch is worth considering as the difference is
significant.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37997#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list