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

Executing a lot of querys on every page load #36

Open
leo-unglaub opened this issue Jan 31, 2019 · 2 comments
Open

Executing a lot of querys on every page load #36

leo-unglaub opened this issue Jan 31, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@leo-unglaub
Copy link

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 leo-unglaub changed the title Exdcuting a lot of requests on every page load Executing a lot of querys on every page load Jan 31, 2019
@m2de
Copy link
Contributor

m2de commented Feb 1, 2019

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 m2de added the enhancement New feature or request label Feb 1, 2019
@shineirvin
Copy link

Is this case solved yet in laravel nova 2.0 ?

yayann added a commit to SGS-Optimisation/novatoolpermissions that referenced this issue Jan 23, 2023
…lagged-rules

Feature/17 op flagged rules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants