Repository navigation
Optimize getSharedWith to fetch permissions with initial query instead of one per card - #6114
juliusknorr wants to merge 7 commits into
Conversation
| } | ||
|
|
||
| try { | ||
| $this->permissionService->checkPermission($this->cardMapper, $share->getSharedWith(), Acl::PERMISSION_EDIT, $userId); |
There was a problem hiding this comment.
This is the previously expensive part as it needs to:
- find the board id for the card which we already have in the result of the query that fetches all shares
- fetches the permissions for each board (N+1) which can be optimized by only fetching once we have all board ids
- Then a map from card id to the related board permissions is built and passed along to the logic above to actually build the file permissions
|
@juliushaertl I think cypress/integration tests are failing. :) |
5930b64 to
8e57bcf
Compare
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
8e57bcf to
cb469fb
Compare
|
Tests should pass now. |
|
🐢 Performance warning. |
|
🐢 Performance warning. |
|
@juliusknorr Can we get this merged soon? |
|
The permission part landed in #8359 and this branch only has a CI debug step left, so closing. I'll open the label query chunking separately if it still turns out to be needed. |

Summary
TODO
Checklist