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

README suggests creating menus in middleware but this can lead to performance issues #310

Open
kminek opened this issue Oct 8, 2024 · 0 comments

Comments

@kminek
Copy link

kminek commented Oct 8, 2024

If your menu is created dynamically (for instance from database queries) those queries will be executed for every web request, even on pages where you dont have menus. This is because Menu::makeOnce resolves callback immediately! I was not aware of that and honestly this behaviour surprised me. I think callback should be resolved while trying to render menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant