wordpress-develop/tests/phpunit/data/themedir1
Jonny Harris 3ad20183b0 Editor: Improve performance of _register_theme_block_patterns function.
The `_register_theme_block_patterns` function imposed a significant resource overhead. This issue primarily stems from themes, such as TT4, that register a substantial number of block patterns. These patterns necessitate numerous file operations, including file lookups, file reading into memory, and related processes. To provide an overview, the _register_theme_block_patterns function performed the following file operations:

- is_dir
- is_readable
- file_exists
- glob
- file_get_contents (utilized via get_file_data)

To address these issues, caching using a transient has been added to a new function call `_wp_get_block_patterns`. If theme development mode is disabled and theme exists, the block patterns are saved in a transient cache. This cache is used all requests after that, saving file lookups and reading files into memory. Cache invalidation is done, when themes are switched, deleted or updated. Meaning that block patterns are not stored in the cache incorrectly. 

Props flixos90, joemcgill, peterwilsoncc, costdev, swissspidy, aristath, westonruter, spacedmonkey.
Fixes #59490

git-svn-id: https://develop.svn.wordpress.org/trunk@56765 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-03 15:16:55 +00:00
..
block_theme-[0.4.0]
block-theme
block-theme-child Editor: Introduce get_block_asset_url Utility Function. 2023-09-25 17:47:27 +00:00
block-theme-child-deprecated-path Themes: Improve performance of get_block_theme_folders function 2023-09-19 16:15:52 +00:00
block-theme-child-no-theme-json
block-theme-child-with-fluid-layout Editor: Don't use fluid layout value in typography. 2023-09-01 04:01:23 +00:00
block-theme-child-with-fluid-typography
block-theme-child-with-fluid-typography-config Editor: add configurable viewport sizes for fluid typography. 2023-09-07 04:28:45 +00:00
block-theme-deprecated-path
block-theme-non-latin
block-theme-patterns Editor: Improve performance of _register_theme_block_patterns function. 2023-10-03 15:16:55 +00:00
block-theme-post-content-default Editor: Fix post editor layout when Post Content has no attributes. 2023-09-20 01:24:32 +00:00
block-theme-with-hooked-blocks Tests: Cover Block Hooks integration with a custom block theme 2023-10-03 08:27:51 +00:00
broken-theme
camelCase
child-parent-itself
custom-internationalized-theme
default
default-child-no-theme-json
empty-fontface-theme
fonts-block-theme Introduce font-face styles generator and printer. 2023-08-31 21:47:40 +00:00
internationalized-theme
page-templates
page-templates-child
rest-api
sandbox
stylesheetonly
subdir
theme1
theme1-dupe
update-uri-theme