Skip to content

Navigation block causes a lot of uncached unoptimized network requests that can even cause WP to start responding in 504 errors #69563

Closed
@fabiankaegy

Description

@fabiankaegy

The Navigation Item block has a few checks built in to see if a navigation item is valid or not. It does that by fetching the post with the ID that it stores in attributes. This behavior was added in #31716.

The problem is that it does that on render for every single navigation item. Which is a problem especially when the "show template" option is enabled ot when you are in the site editor.

On navigation heavy sites the header + footer can easily reach 100+ navigation items which results in a lot of individual request happening all at once.

Ideally these isInvalid checks would only happen when the block is selected or if the block is not rendered in the contentOnly / disabled rendering mode.

Metadata

Metadata

Assignees

Labels

[Block] NavigationAffects the Navigation Block[Block] Navigation LinkAffects the Navigation Link Block[Type] BugAn existing feature does not function as intended

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions