-
Notifications
You must be signed in to change notification settings - Fork 22
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
ACL creates heavy and slow database traffic #94
Comments
please provide code example of steps to reproduce the best way to verify it is to place it into a unit test and enable https://github.com/atk4/data/blob/3.1.0/src/Schema/TestCase.php#L23 then the queries should be dumped |
when ACL rule can include/exclude the whole table, I belive the generated SQL should be much more performant |
@mkrecek234 do you mean much more queries are generated or they are only slower? |
@mvorisek It results in a lot of additional queries being executed as ACK rules are checked for each field. I noticed if you have models which by default are adding a lot of hasOne fields and thus joining a lot of queries (in my case even over multiple join cascades), this reduces the database speed a lot. In my case ACL was resulting in 4-5sec queries, whereas without ACk it was far below 1sec. |
yes, larger queries are expected and as I have written, it would make sense to optimize the case when user has ACL for whole table only, thus ACL would not be needed to be checked per row my question is, if the queries are only larger/slower, or if you meant more (much more) queries in total are executed it would be helpful if you can attach minimalistic SQL log /w and /wo ACL enabled |
Steps to reproduce:
Issue:
The text was updated successfully, but these errors were encountered: