nextcloud / nextcloud/server

Don't do a full nested mount setup when listing a directory.

Open
#57,351 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop performance 🚀
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Currently, listing a directory, performs a filesystem setup for the directory and all of it's children, even though we don't really care about deeply nested mounts (see also https://github.com/nextcloud/server/issues/57350)

There are 2 ways we could optimize this.

  1. Add an option to setup the filesystem for only 1 level of child-mounts instead of child-mounts at any depth.
  2. Instead of setting up the actual mount points for the children, just fetch the metadata for the mountpoints (using oc_mounts) and then create LazyFolder stubs with them.

Option 2. should be the more optimal one, but it would require storing per-users permissions (or permissions mask) in oc_mounts to deal with the fact that different users have different permissions for shares/groupfolders.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the directory-listing filesystem setup and how child mounts are represented in oc_mounts and LazyFolder. Compare the two optimization options described in the issue, including their implications for per-user permissions. The issue does not define a chosen approach or concrete completion criteria, so those need to be clarified before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, databases, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.