-
Notifications
You must be signed in to change notification settings - Fork 143
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
Children() method run slowly #112
Comments
It is normal, and children() should not be called regularly. It is only meant for a UI page listing the roles, not for permission checks.
What are you using it for?
… On Nov 30, 2018, at 3:48 AM, P-A ***@***.***> wrote:
Children() method takes a lot of time to return the child roles, is this normal?
I specify, I handle a lot of roles.
If it's normal, how do I get around it?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#112>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABVjWxmROyDgfPWoHtDAZv0fqF90iKJlks5u0PDagaJpZM4Y7Ps_>.
|
Of course, I understand that this method should not be misused, but I waited almost 15 seconds to start listing and displaying the roles. |
That's not right.
We're using Nested Sets solely to reduce this load. It definitely shouldn't take 15 seconds.
Did you change any of the database indexes? Can you let me know the cardinality of tables?
… On Dec 3, 2018, at 2:50 AM, P-A ***@***.***> wrote:
Of course, I understand that this method should not be misused, but I waited almost 15 seconds to start listing and displaying the roles.
Is there a possible system to reduce this time?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#112 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABVjWxSqF6SGDF7QmR-M2gfbnXUquK1sks5u1NeqgaJpZM4Y7Ps_>.
|
no, I assure you that I didn't changed anything on the database. |
How many roles/permissions are there?
… On Dec 3, 2018, at 8:55 AM, P-A ***@***.***> wrote:
no, I assure you that I didn't changed anything on the database.
I only used the implemented methods and did my tree.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#112 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABVjW4a3hTUXTRKeQYQkOQHN7pjTigaqks5u1S1KgaJpZM4Y7Ps_>.
|
almost a thousand |
There should be no issues. Can you share your database with me for testing?
There is definitely something wrong.
I have tested the library with upwards of 1 million rows and results are under 1 sec.
… On Dec 3, 2018, at 9:10 AM, P-A ***@***.***> wrote:
almost a thousand
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#112 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABVjW9pNp2BAbxsos7miNrt0gYqj6TU_ks5u1TDzgaJpZM4Y7Ps_>.
|
of course here it is. |
I was unable to open the zip file.
… On Dec 3, 2018, at 9:26 AM, P-A ***@***.***> wrote:
of course here it is.
rbac.zip <https://github.com/OWASP/rbac/files/2639794/rbac.zip>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#112 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABVjW4SVl3Ikm_ayqjui82OXYBEU5Ifgks5u1TSJgaJpZM4Y7Ps_>.
|
sorry |
and I do my test of children methode on role_id == 647 (ROLE_MANAGER/1) an dit takes a lot of time |
I see two issues with your database.
1. There are some 15,000 permissions and 1,000 roles, and about 50,000 role-permission relations.
However, that doesn't seem to be the real issue:
2. Your permissions have slashes in their name.
If you want to use the path based query, you should probably not use slashes in your role/permission names, as they will conflict with the pathing.
… On Dec 3, 2018, at 9:30 AM, P-A ***@***.***> wrote:
and I do my test of children methode on role_id == 647 (ROLE_MANAGER/1) an dit takes a lot of time
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#112 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABVjW3kdtVFLXaNVL-8TuQWoLwa8uShmks5u1TWXgaJpZM4Y7Ps_>.
|
Yes, I will try to reduce my roles, permissions and relationships. I will also replace the slashes with another character. |
The number of roles and permissions shouldn't really be an issue.
Just try to replace all slashes with _ and see if it gets fixed.
… On Dec 3, 2018, at 9:52 AM, P-A ***@***.***> wrote:
Yes, I will try to reduce my roles, permissions and relationships. I will also replace the slashes with another character.
If the problem persists, I will come back to this topic.
Thank you so much.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#112 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABVjW2VXFME15Of-FWl-5szvCHOBBBqKks5u1TqkgaJpZM4Y7Ps_>.
|
Okay. |
Children() method takes a lot of time to return the child roles, is this normal?
I specify, I handle a lot of roles.
If it's normal, how do I get around it?
The text was updated successfully, but these errors were encountered: