novatoolpermissions icon indicating copy to clipboard operation
novatoolpermissions copied to clipboard

Executing a lot of querys on every page load

Open leo-unglaub opened this issue 6 years ago • 2 comments

Hey, i use your nova addon and it works great. But on one page where I list some resources (30 out of 400 total) i noticed that the addon executes the following querys around 800 000 times for every page view. Thats a lot :)

select * from `role_permission` where `role_permission`.`permission_slug` = ? limit 1
select * from `role_permission` where `role_permission`.`permission_slug` = 'teammember' limit 1

Do you know why the querys above get executed so much? Thanks and greetings Leo

leo-unglaub avatar Jan 31 '19 14:01 leo-unglaub

Hi. I have also noticed this in a previous project with a lot of Policies. This is caused by the nobodyHasAccess check. Looking at resolving this in 2.0 but for now I would recommend removing it from your permissions to avoid the queries unless you absolutely need it.

m2de avatar Feb 01 '19 20:02 m2de

Is this case solved yet in laravel nova 2.0 ?

shineirvin avatar Jun 24 '19 04:06 shineirvin