Skip to content

Editor performance improvements#2881

Open
abaicus wants to merge 7 commits into
developmentfrom
chore/performance
Open

Editor performance improvements#2881
abaicus wants to merge 7 commits into
developmentfrom
chore/performance

Conversation

@abaicus

@abaicus abaicus commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Closes Codeinwp/otter-internals#250.

Summary

Small performance improvements for the block editor editor

Screenshots


Test instructions

  • Plugin Card cache — Open a post that already contains a Plugin Card block (it's deprecated/hidden from the inserter; or paste <!-- wp:themeisle-blocks/plugin-cards {"slug":"otter-blocks"} /--> via the code editor). View on frontend → card renders; reload → (transient otter_plugin_card_<slug> is set) - you should see it in the DB.
  • Patterns Library — With the module ON, the Patterns/Design Library button opens, patterns load, and search works. Turn the module OFF → its script isn't requested and the editor still work (see in the inspector Network tab by filtering for otter in the search)
  • Font Awesome iconschunk-fontawesome-icons.js is NOT loaded on editor open; it loads when you insert an icon block, open an icon picker (Button/Icon List/Font Awesome block) — grid populates, search works, selection persists. Accordion open/close icons still render.
  • Dynamic Content / AI toolbar — With each module ON, the feature works and its chunk loads; with it OFF, the chunk isn't requested and the editor still works. Posts with existing dynamic values save without losing them.
  • Visibility Conditions (regression) — Add a condition to a core block and an Otter block, save, reload → it persists and applies. (This module was intentionally left eager; verify it didn't regress.)
  • No new console errors in the editor or on the frontend.

Checklist before the final review

  • [ ]Included E2E or unit tests for the changes in this PR.
  • Visual elements are not affected by independent changes.
  • It is at least compatible with the minimum WordPress version.
  • It loads additional script in frontend only if it is required.
  • Does not impact the Core Web Vitals.
  • In case of deprecation, old blocks are safely migrated.
  • It is usable in Widgets and FSE.
  • Copy/Paste is working if the attributes are modified.
  • PR is following the best practices

@pirate-bot pirate-bot added the pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) label Jun 25, 2026
@pirate-bot

Copy link
Copy Markdown
Contributor

Bundle Size Diff

Package Old Size New Size Diff
Animations 178.27 KB 178.27 KB 0 B (0.00%)
Blocks 1.64 MB 1.53 MB -109.78 KB (-6.54%)
CSS 7.87 KB 7.87 KB 0 B (0.00%)
Dashboard 111.06 KB 111.06 KB 0 B (0.00%)
Onboarding 68.14 KB 68.14 KB 0 B (0.00%)
Export Import 4.7 KB 4.7 KB 0 B (0.00%)
Pro 328.48 KB 436.29 KB 107.8 KB (32.82%)

@pirate-bot

Copy link
Copy Markdown
Contributor

Plugin build for d2b9bcc is ready 🛎️!

@pirate-bot

Copy link
Copy Markdown
Contributor

E2E Tests

Playwright Test Status: See serial and parallel matrix jobs

Performance Results serverResponse: {"q25":453.8,"q50":474.6,"q75":498.6,"cnt":10}, firstPaint: {"q25":553.7,"q50":617.45,"q75":724.1,"cnt":10}, domContentLoaded: {"q25":3403.9,"q50":3430.3,"q75":3451.2,"cnt":10}, loaded: {"q25":3406,"q50":3432.35,"q75":3453.1,"cnt":10}, firstContentfulPaint: {"q25":3941.2,"q50":3971.5,"q75":3996.1,"cnt":10}, firstBlock: {"q25":13621.2,"q50":13684.45,"q75":13736,"cnt":10}, type: {"q25":22.56,"q50":23.06,"q75":24.47,"cnt":10}, typeWithoutInspector: {"q25":18.64,"q50":20.13,"q75":20.83,"cnt":10}, typeWithTopToolbar: {"q25":27.54,"q50":29.12,"q75":29.57,"cnt":10}, typeContainer: {"q25":13.81,"q50":14.36,"q75":15.52,"cnt":10}, focus: {"q25":101.06,"q50":108.82,"q75":113.82,"cnt":10}, inserterOpen: {"q25":36.15,"q50":36.76,"q75":38.49,"cnt":10}, inserterSearch: {"q25":12.46,"q50":12.56,"q75":12.7,"cnt":10}, inserterHover: {"q25":4.58,"q50":4.75,"q75":4.91,"cnt":20}, loadPatterns: {"q25":1559.95,"q50":1571.7,"q75":1696.54,"cnt":10}, listViewOpen: {"q25":223.31,"q50":227.73,"q75":234.9,"cnt":10}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants