[wp-trac] [WordPress Trac] #59465: Twenty Twenty-Four performance assessment and opportunities
WordPress Trac
noreply at wordpress.org
Wed Sep 27 14:38:03 UTC 2023
#59465: Twenty Twenty-Four performance assessment and opportunities
----------------------------+--------------------------
Reporter: flixos90 | Owner: flixos90
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: 6.4
Component: Bundled Theme | Version:
Severity: normal | Resolution:
Keywords: | Focuses: performance
----------------------------+--------------------------
Comment (by spacedmonkey):
After doing some [https://blackfire.io/profiles/cf46ddf5-fcd5-4c8e-
91a4-6f8619a5bf87/graph profiling], I noticed that there is larger number
of calls to `file_get_contents`. This is becuase in
`_register_theme_block_patterns`, this calls get_file_data then
`file_get_contents`. Unlike other core themes, this new theme register
many block patterns. When a block pattern is registered, it is loading
into memory to read the file headers. Loading 50+ php files into memory is
slow and make this theme slower than normal.
I think we should consider, either adding some caching
`_register_theme_block_patterns` or performance tweak or remove the
patterns from the theme.
I strongly believe that we should be pushing out the door a new core theme
that is a lot slower than the last core theme.
It is worth noting that I noted similar performance issue with the popular
[https://frostwp.com/ block theme frost].
[https://blackfire.io/profiles/9b2fed87-7e75-4de0-8b03-f950b0332146/graph
Profile data].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59465#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list