nextcloud / nextcloud/server

Subfolder Search

Open
#37,434 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement feature: filesystem performance 🚀
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Hello, everyone.
I am using nextcloud server, and I need some features, such as sub folder search. So I decided to modify nextcloud server code, and found depth variable of nextcloud. So I set this variable -1 and it seems to behavior right. But I found that number of sql queries increased very highly. Through some research, I know nextcloud uses recursive search and every search runs some queries in subfolder search. This is too heavy.
Why doesn't nextcloud reduce the number of queries?
Please see lib/private/files/view.php and cache.php.
Here, nextcloud request and build some sql queries. I modified cache.php. So the number of queries is reduced. But one question.
Why doesn't nextcloud use this method?
Annotation 2023-03-27 164410

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 reading lib/private/files/view.php and cache.php, focusing on how recursive subfolder searches build and execute SQL queries. Reproduce the search with depth set to -1 and compare query counts before and after any investigation. Done means the intended query reduction and subfolder-search behavior are clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, databases, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.