-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Currently when fetching shares, we first fetch the shares from each provider and then merge the results in the manager. This is inefficient and creates for each share provider (default, federated share, mail, deck, circle and talk) a very similar request where we do a SELECT query where the only difference is a AND share_type = ?.
Instead we could have a createShareFromRow(array $data): IShare in the IShareProvier and let the manager fetch all shares and then call the createShareFromRow corresponding to the provider. This would be much quicker and would allow use to get rid of some duplication.
This comes from #58057 where we are doing an absurd number of SQL request when deleting a group share (around 6 queries per user who had access to the share) and that could be only one. And there is more codepath doing similar queries.
This requires an change in the OCP API. The impact should be not that big as only deck, circle and talk implement this API and they are released at the same time as server.