Performance: screen-gate assets, cache hot paths, asset bug fixes#471
Draft
cbravobernal wants to merge 1 commit into
Draft
Performance: screen-gate assets, cache hot paths, asset bug fixes#471cbravobernal wants to merge 1 commit into
cbravobernal wants to merge 1 commit into
Conversation
Lower-risk half of the performance audit (sibling-field priming is split into its own PR for focused review). Everything here is behavior-identical or a straight bug fix. PHP runtime: - Per-request cache for acf_get_option_meta(), invalidated via core option hooks (keeps the esc_like() hardening from #462; the cache wraps it). - Decode each local JSON file once per request instead of 4x. - acf_decode_taxonomy_term(): raw SQL -> get_term(). - Early bail in the blocks save path when no block types are registered. - Gate the escaped-html notice script to when the notice renders. - Memoize the WP version check in acf_is_using_datastore(). Assets / enqueue: - Move scf-bindings to enqueue_block_editor_assets (was pulling the wp-editor stack onto classic admin + front-end acf_form pages). - Gate command-palette scripts on wp-commands being enqueued. - Drop wp-polyfill from all handles (webpack injectPolyfill). - Fix pro CSS min suffix (production shipped unminified CSS). - Gate acf-pro-ui-options-page with is_admin(). - Fix acf-dark stylesheet 404. - Trim release zip (exclude assets/src + source maps): -4.2 MB. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lower-risk half of the performance audit, split out from #466 so it can be reviewed and merged without waiting on multilingual testing. The sibling-field priming (the one change that touches the field-value load path and interacts with WPML/Polylang/ACFML) is in its companion PR. Everything here is behavior-identical or a straight bug fix.
PHP runtime
acf_get_option_meta(), invalidated via core option hooks. Keeps theesc_like()hardening from Use esc_like() when building option-meta LIKE patterns #462 — the cache wraps that query, it does not revert it.includes/local-json.php): ~44ms → ~16ms at 200 files.acf_decode_taxonomy_term(): raw SQL →get_term().acf_is_using_datastore().Assets / enqueue
scf-bindingsmoved toenqueue_block_editor_assets(was pulling the wp-editor stack onto classic admin + front-endacf_formpages).wp-commandsbeing enqueued.wp-polyfillfrom all handles (webpackinjectPolyfill). Compiled assets are gitignored and rebuilt at release (bin/prepare-release.php), so this takes effect on the next release build.acf-pro-ui-options-pagewithis_admin().acf-darkstylesheet 404.assets/src+ source maps): −4.2 MB.Verification
composer test:php: OK (2823 tests, 21565 assertions).npm run test:unit: 951.composer test:phpstan: clean.@since SCF 6.9.0(6.8.9 already shipped without it).See #466 (superseded by this PR + the sibling-priming PR).
Use of AI Tools
Initial implementation by Claude Code (Claude Fable 5) under human direction; split, reviewed and revised by Claude Code (Claude Opus 4.8). All changes human-reviewed.