[wp-trac] [WordPress Trac] #41305: Add lazily evaluated translations
WordPress Trac
noreply at wordpress.org
Thu Oct 4 19:35:09 UTC 2018
#41305: Add lazily evaluated translations
-------------------------------------------------+-------------------------
Reporter: schlessera | Owner: jnylen0
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.0
Component: I18N | Version: 4.8
Severity: normal | Resolution:
Keywords: has-patch early dev-feedback needs- | Focuses: rest-api,
testing | performance
-------------------------------------------------+-------------------------
Comment (by mnelson4):
I ran @TimothyBlynJacobs's test, (except with one tenth the iterations
because I was running out of memory).
== Summary
41305.3.diff (latest from @TimothyBlynJacobs) is nearly twice as fast as
41305.all-in.2.diff (latest from @schlessera) and uses 1/3 the memory.
== Details
master:
Time 0.23000001907349
Memory: 9490200
41305.all-in.2.diff (latest from @schlessera):
Time 0.62402606010437
Memory: 57761176
41305.3.diff (latest from @TimothyBlynJacobs):
Time 0.28000116348267
Memory: 20161176
So, in this test, 41305.3.diff was nearly as fast as master, although used
up twice the memory. 41305.all-in.2.diff was 3x slower and used up nearly
6x the memory. (Given, this test assumes all strings are evaluated; I
realize the reason this ticket helps is because most strings are NOT
evaluated).
So 41305.3.diff looks like an improvement on 41305.all-in.2.diff to me.
Note I'm on PHP 7.1.19
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41305#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list