nextcloud / nextcloud/server

Uploading folder with wide and deep hierarchy is very slow

Open
#53,720 12 comments 7 reactions 1 assignee View on GitHub

@susnux is already working on this.

Since Jul 29, 2025.

1. to develop enhancement feature: dav feature: files hotspot: file transfer performance performance 🚀
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.
When uploading a folder with a wide and deep hierarchy through the web interface, the process of just creating the folder structure takes very long. All requests are run sequentially and the deeper the hierarchy the more requests each folder needs:

Image

Describe the solution you'd like

  1. Run some of the requests in parallel (race conditions on the same folder parent should be avoided, but is probably not needed with no. 2)
  2. Reduce the overall number of requests:
  • The PROPFINDs for /files and /files/<user> can be removed since we can safely assume that they must exist.
  • The second PROPFIND for the target folder should not be necessary, since that one returned 404 the first time (yes this could result in a race condition with another requests, but it can already happen anyway and it's not problematic since we just want the folder to exist).
  • With https://github.com/nextcloud/server/pull/53621 all PROPFINDs can be removed as we can just MKCOL the target directory and it will ignore if any of the parents don't already exist. Even the initial PROPFIND that returns 404 can be removed, as it's cheaper to just always MKCOL instead.

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.