Skip to content

All synced patterns are loaded in background - critical slow down of editor #64150

@wpsoul

Description

@wpsoul

Description

Latest WP 6.6 and 6.6.1 have one strange problem. At first, I found that all posts that use synced patterns are loaded very slow. So, to test, I added console.log to all my blocks in plugin. And I was surprised to see that all my blocks from synced patterns (reusable templates) are loaded on all pages (even on those that don't use them in content).

Is it correct? Now all synced patterns are loaded everywhere in editor?

Step-by-step reproduction instructions

  1. Create reusable templates (synced patterns) and put there some blocks with console.log
  2. Create new page, do not add there any synced pattern
  3. Add there any block
  4. On first loading - looks fine, you will see 1-2-3 console.log from one block that is on page. But when you click on block, you will see a lot of logs from all blocks from all synced patterns

If site has dynamic blocks (like loop block) in synced patterns, this will make page almost impossible to use because all loops will be loaded at once.

Screenshots, screen recording, code snippet

No response

Environment info

  • WP 6.6.1

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TestingNeeds further testing to be confirmed.[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions