Closed
Description
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.