Opened 19 months ago
Last modified 7 weeks ago
#59596 new enhancement
Cache file sizes of core block style files.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 6.3 |
Component: | Editor | Keywords: | has-patch dev-feedback |
Focuses: | performance | Cc: |
Description
Introduced in #58528 / [56044], there is now cache for file lookups for core block styles. This was to save file lookups and improve server response time. However, when styles are processed in wp_maybe_inline_styles
a file lookup is done using wp_filesize
to get the file size and if the file exists. These lookup can be expensive. As there is already an existing transient cache, reuse that to also cache the file size of the files.
Change History (8)
This ticket was mentioned in PR #5459 on WordPress/wordpress-develop by @spacedmonkey.
19 months ago
#1
- Keywords has-patch added
This ticket was mentioned in PR #5459 on WordPress/wordpress-develop by @spacedmonkey.
19 months ago
#2
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/59596
This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.
19 months ago
#4
@
19 months ago
- Keywords dev-feedback added
Thanks @spacedmonkey. Conceptually, this idea makes sense. It would be great if someone could do an initial analysis of the current performance cost of these wp_filesize
lookups prior to us getting into the implementation details, in order to help prioritize this work appropriately.
This ticket was mentioned in Slack in #core-performance by spacedmonkey. View the logs.
13 months ago
#6
@
6 months ago
I think this ticket has a lot of benefits. Recalulating file size for files that do not changes is wasteful. Some level of change the is cleared on WordPress core update makes sense to me.
Love feedback from @flixos90 and @mukesh27.
Trac ticket: https://core.trac.wordpress.org/ticket/59596