Skip to content

Commit 87c99e0

Browse files
committed
feat: Improve sharings retrieval performances
When dealing with large sharings, requesting the list of sharings can be quite slow, i.e. several seconds. This is because by default this route returns the list of *all* shared docs. So if we deal with thousands of docs, this is slow to compute and transmit. We do not need this list of shared docs, so let's disable it.
1 parent 5b93519 commit 87c99e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cozy-sharing/src/SharingProvider.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export class SharingProvider extends Component {
186186
}
187187
const { doctype, client } = this.props
188188
const [sharings, permissions, apps] = await Promise.all([
189-
this.sharingCol.findByDoctype(doctype),
189+
this.sharingCol.findByDoctype(doctype, { withSharedDocs: false }),
190190
this.permissionCol.findLinksByDoctype(doctype),
191191
client.fetchQueryAndGetFromState(fetchApps())
192192
])

0 commit comments

Comments
 (0)