Identical query when getting directory listing of a Folder
@icewind1991 is already working on this.
Since May 11, 2017.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.