[wp-trac] [WordPress Trac] #57683: Improve performance of mysql2date
WordPress Trac
noreply at wordpress.org
Fri Mar 3 21:40:49 UTC 2023
#57683: Improve performance of mysql2date
--------------------------+-----------------------------
Reporter: spacedmonkey | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Date/Time | Version: 0.71
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
--------------------------+-----------------------------
Comment (by Rarst):
Replying to [comment:6 spacedmonkey]:
> Have my own PR at [https://github.com/WordPress/wordpress-
develop/pull/4169 #4169]. This caches the timezone as a static variable.
>
> @Rarst Can you take a look and see what you think?
As above I am against bespoke caching for options. Options in general and
definitely Date/Time options specifically, things are broken enough with
it.
And that also exploded a ton of unit tests (probably because it made the
function much less testable, rather than functionally broke it).
Your other PR halved option calls inside mysql2date, right? I maintain we
can do low hanging optimization here which would further half (so calls
down 4x compounded) and re-test. I can doodle a PR if there is a demand to
deal with it sooner rather than later. :)
Maybe look at what is going with options caching/autoload after, to my
memory this has never been a significant perf outlier.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57683#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list