Laravel-Backpack/MenuCRUD

A lot of sql query with MenuCRUD

evenloooo opened this issue · 1 comments

Hi guys,
I found a issue with MenuCRUD. When I access CRUD admin page, the MenuCRUD make CRUD page loading slowly.
Btw, I'm in the 'general' CRUD page.( not in the MenuCRUD page)
image
image

I added some code to speed up the page, but I think it's not a best way.
image
image

Do you have some idea for fix this?
Thanks!

Hi @evenloooo ,

The getTree() function only does one select, so I don't think the problem is in the ViewComposer, but in the view itself (or in the layout view). I think you may be loading the menu view in a loop.

Cheers!

PS. For development questions (non-bugs), it's recommended that you post on Stack Overflow (using the backpack-for-laravel tag) or Gitter, after you're sure you can't solve the problem yourself and there isn't an answer to that already. There are a lot more people on Gitter and StackOverflow. Plus:

  • on StackOverflow people are rewarded with points for helping you out;
  • on StackOverflow your conversation will be better indexed by search engines;
  • for super-urgent issues, nothing beats a chatroom, like Gitter; if anyone's online, of course;
  • we can keep the Github Issues only for bugs that affect everyone, so we can crush them faster;

If you want to help people out with development question, that would be a HUGE help for the project. You can answer people:

Answering questions improves communication skills, makes you better understand the inner workings and improves your self-esteem. Just sayin' :-)