Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue with navigation link block #40750

Closed
spacedmonkey opened this issue May 1, 2022 · 0 comments · Fixed by #40752
Closed

Performance issue with navigation link block #40750

spacedmonkey opened this issue May 1, 2022 · 0 comments · Fixed by #40752
Assignees
Labels
[Block] Navigation Link Affects the Navigation Link Block [Block] Navigation Affects the Navigation Block [Block] Post Navigation Link Affects the Post Navigation Link Block [Type] Performance Related to performance efforts

Comments

@spacedmonkey
Copy link
Member

Description

There is a performance issue with navigation link block. The navigation link block, does a call to get_post. This can result in a datatbase call if the post is not primed in cache. If you have a large menu, with 50+ item, this can result in 50+ queries. This is a scale and performance issue.

All posts should primed in one request.

Related to core issue, see - https://core.trac.wordpress.org/ticket/55428

Step-by-step reproduction instructions

  1. Create menu
  2. Add lots of posts / pages to menu.
  3. View on front end.

Screenshots, screen recording, code snippet

Screenshot 2022-05-01 at 20 00 29

Screenshot 2022-05-01 at 20 00 22

Environment info

No response

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

@spacedmonkey spacedmonkey self-assigned this May 1, 2022
@spacedmonkey spacedmonkey added [Type] Performance Related to performance efforts [Block] Navigation Affects the Navigation Block [Block] Post Navigation Link Affects the Post Navigation Link Block [Block] Navigation Link Affects the Navigation Link Block labels May 1, 2022
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label May 1, 2022
@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Link Affects the Navigation Link Block [Block] Navigation Affects the Navigation Block [Block] Post Navigation Link Affects the Post Navigation Link Block [Type] Performance Related to performance efforts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants