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

perf(sharing): Improve performance of share provider queries #43481

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Feb 9, 2024

TODO

  • Remove the item_type from the query so other indices can be used
  • Split the getSharedWith() method
  • The removed orderBy makes unit test flaky on Postgres...

Split the getSharedWith() method

  • User and group shares
  • "get all" (mount logic) and "get some"

To improve the performance of the "get all" it was extracted into
yet another method, to allow to further optimize it.
E.g. the query was split into reading the shares and reading the
filecache, which will be required for future work with sharding anyway.
Without limits we also don't need to sort the entries.

Checklist

First of all the method was huge and was handling multiple usecases:

- User and group shares
- "get all" (mount logic) and "get some"

To improve the performance of the "get all" it was extracted into
yet another method, to allow to further optimize it.
E.g. the query was split into reading the shares and reading the
filecache, which will be required for future work with sharding anyway.
Without limits we also don't need to sort the entries.

Signed-off-by: Joas Schilling <[email protected]>
@skjnldsv skjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Feb 23, 2024
@Altahrim Altahrim mentioned this pull request Mar 12, 2024
This was referenced Jul 30, 2024
@skjnldsv skjnldsv marked this pull request as draft November 15, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants