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

[Bug]: Slow query getMountsForStorageId when user has many shared folders #49353

Open
4 tasks done
Ivansss opened this issue Nov 18, 2024 · 4 comments
Open
4 tasks done
Assignees

Comments

@Ivansss
Copy link
Member

Ivansss commented Nov 18, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

Detected the issue in the following scenario:

User A has 40K+ shared folders
User A share one of those folders with User B
User B experiences slowness because it has to cope with the 40K+ mount points

$mounts = $userMountCache->getMountsForStorageId($node->getStorageId());
foreach ($mounts as $mount) {

The query was triggered by "Text" app's rich workspaces:

Image

Expected behavior

User B should not experience that slowness when loading its files

@Ivansss Ivansss added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Nov 18, 2024
@susnux susnux moved this to 🏗️ In progress in 📁 Files team Nov 19, 2024
@susnux susnux added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Nov 19, 2024
@oleksandr-nc
Copy link

Detected the issue in the following scenario:

User A has 40K+ shared folders User A share one of those folders with User B User B experiences slowness because it has to cope with the 40K+ mount points

We have the same scenario, only in it disabling "rich workspaces" does not help in that case.

@icewind1991
Copy link
Member

Having it such that loading the share for userB doesn't require setting up all the shares for userA would require a significant rework in how the filesystem is setup.

@icewind1991
Copy link
Member

Looking at things again, this specific code path (via getWatcher) can maybe be improved. But I don't know how much that fixes the overall performance in a setup like this.

@icewind1991
Copy link
Member

#49569

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗️ In progress
Development

No branches or pull requests

7 participants