Refactor share backend to be more efficient#58365
Conversation
5b998ef to
a0a194a
Compare
First check which users have a shares and for which providers and then only load these shares. Avoid doing at most 5 SQL queries for each users a share was shared with if there are no shares. Signed-off-by: Carl Schwan <carlschwan@kde.org>
- Fetch share from various providers at once by providing a new interface for providers to create their share based on raw data from the database - Use more efficient key-based pagination instead of offset-based pagination Signed-off-by: Carl Schwan <carlschwan@kde.org>
a0a194a to
64228ea
Compare
|
For dealing with provider specific logic, such as the per-user child shares for groups/teams/etc. It might be worth looking at how the filecache search does it. It allows the cache instance to customize the filtering by overriding So instead of implementing the various share filtering options in the share manager, we could have something like |
|
Internal discussion: This is helpful but we are planing to overhaul/rewrite sharing for 34 and the new implementation will be build from the ground up without this limitation |
Summary
Instead of making queries in each providers, do it once in the manager depending on the providers enabled and then only create the share objects in the share providers.
Additionally introduce a new API for iterating not based on offset but on max_id, min_id
TODO
Checklist
3. to review, feature component)stable32)