nextcloud / nextcloud/server

Identical query when getting directory listing of a Folder

Open
#4,815 2 comments 0 reactions 1 assignee View on GitHub

@icewind1991 is already working on this.

Since May 11, 2017.

1. to develop enhancement feature: database feature: filesystem performance 🚀 technical debt
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

When you get a folder from the Node API and then at some point on that folder run getDirectoryListing it will perform the same query.

This is caused at https://github.com/nextcloud/server/blob/master/lib/private/Files/Node/Folder.php#L96 because we pass in the path (and not the folder object) and so https://github.com/nextcloud/server/blob/master/lib/private/Files/View.php#L1404 will perform the exact same query.

Now the query is most likely fast. But it is still silly to do it twice (especially since in a lot of cases they will happen right after each other).

@icewind1991 please have a look once 12 is out 😉

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.