#57114 closed enhancement (fixed)
Add caching to is_block_theme
Reported by: | spacedmonkey | Owned by: | spacedmonkey |
---|---|---|---|
Milestone: | 6.2 | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Themes | Keywords: | has-patch has-unit-tests add-to-field-guide |
Focuses: | performance | Cc: |
Description
The function is_block_theme
does a check on the filesystem if some times existing. This function could be called 100 of times per page request which would result in many many lookups. This value does not change, unless a theme is upgraded. Added a check would be simple and would save some CPU resources in looking up files.
Change History (12)
This ticket was mentioned in PR #3629 on WordPress/wordpress-develop by @spacedmonkey.
2 years ago
#1
- Keywords has-patch added
This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.
22 months ago
#4
@
22 months ago
@spacedmonkey AS discuss in today's bug scrub. The PR needs some updated based on the feedback.
Ping @flixos90 for the review
Props to @costdev
@spacedmonkey commented on PR #3629:
22 months ago
#5
@costdev Testing cache_get
/ cache_delete
turned out harder than I thought. I have added some unit tests to this PR.
#7
@
22 months ago
- Keywords has-unit-tests added; changes-requested removed
Unit tests added. Reviews very welcome.
@spacedmonkey commented on PR #3629:
22 months ago
#8
@adamsilverstein commented on PR #3629:
21 months ago
#9
Nice work @spacedmonkey - looks good to me.
@flixos90 commented on PR #3629:
21 months ago
#11
Committed in https://core.trac.wordpress.org/changeset/55236.
Trac ticket: https://core.trac.wordpress.org/ticket/57114