[wp-trac] [WordPress Trac] #56975: Replace the internal `WP_Theme_JSON_Resolver::theme_has_support()` with a public function
WordPress Trac
noreply at wordpress.org
Mon Jan 23 16:28:26 UTC 2023
#56975: Replace the internal `WP_Theme_JSON_Resolver::theme_has_support()` with a
public function
-------------------------------------------------+-------------------------
Reporter: oandregal | Owner:
| hellofromTonya
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.2
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: dev-feedback gutenberg-merge has- | Focuses:
patch has-unit-tests has-testing-info | performance
-------------------------------------------------+-------------------------
Comment (by flixos90):
@oandregal Replying to your concern from further up:
> Isn't it the goal to make this cache and the other ones persistent?
[...] Why go to the trouble of adding something we plan to remove if it is
not an issue?
Yes it potentially is, though we will have to measure how that impacts
performance to decide whether it is worth it. At this point, it is safe to
say that a static variable cache is faster than a non-persistent cache
using WP cache API, so we should go with that IMO, since we have no
timeline on making the cache persistent anyway - I doubt we realistically
can get that into 6.2, and we shouldn't ship with an approach that we
could easily achieve and we know is worse performance-wise than another
one.
How it is for a persistent cache using WP cache API, we will have to
measure. I would expect it to be faster, since the actual logic would not
need to run at all in most requests. But it could be that the actual
filesystem check here is so cheap that it the persistent cache overhead is
worse than the logic itself - let's see. All of this is assumptions until
we measure the performance impact.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56975#comment:84>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list