desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Synchronization Progress Display

Open ismasans opened this issue 7 months ago • 4 comments

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.

Feature request

Which Nextcloud Version are you currently using: (see administration page) Nextcloud 32.0.8 (All in One) - MacOS Desktop 33.0.2 with Virtual Files activated

Is your feature request related to a problem? Please describe. When you connect the Mac desktop client to an existing Nextcloud account containing a large number of files and folders, the Nextcloud client does not initially index all the new files and folders, and Finder and Spotlight ignore the existence of those files until you navigate through the folders. Additionally, the client does not display the current sync status, making it difficult to know when the files have finished uploading or downloading.

Describe the solution you'd like When the client connects to the server account for the first time, or after being disconnected (e.g. when the computer has been in sleep mode or switched off), the desktop client should index all new content so that Finder can catalogue and locate it without the user having to open folders manually.

In addition, I would like the client window to display a progress bar showing the indexing and/or sync status, and (if possible) to estimate the time remaining based on the file transfer speed (similar to what Finder does when copying files from one location to another). At the very least, it should display the number of files remaining to be synced/indexed as text.

Example attached ;)

Image

Additional context

I intend to switch from Dropbox to Nextcloud before my subscription expires (in August) because I want to reduce my reliance on US-based services as much as possible and, above all, I want to protect the privacy of my files.

That’s why a few days ago I tried to copy all the content I have on Dropbox to my Nextcloud server — over 400 GB, hundreds of thousands of files in thousands of folders! — and I realised I had no way of knowing how long it would take to sync all that content.

Once the sync was complete, I set up the same account on another Mac and the sync was almost instantaneous, but that was because Finder hadn’t scanned all the new folders and files and didn’t know they existed.

I know that, especially with such a large number of files and folders, indexing can take hours. That’s what happens to me with Dropbox every time I set up an account from scratch. But it’s something that only happens the first time I sync all the content; the second time and onwards it takes very little time as it only indexes the changes. The benefit is that Finder and Spotlight know where the files are and you can search for them, and you don’t have to wait for Finder to read the contents of every folder every time you open one.

ismasans avatar Apr 17 '26 17:04 ismasans

When you connect the Mac desktop client to an existing Nextcloud account containing a large number of files and folders, the Nextcloud client does not initially index all the new files and folders, and Finder and Spotlight ignore the existence of those files until you navigate through the folders.

This is on purpose because it does not scale for accounts and clients in collaborative environments with huge file system structures. For Spotlight support and discovery of not yet enumerated items, there is #9351. 🙂

Additionally, the client does not display the current sync status, making it difficult to know when the files have finished uploading or downloading.

With file provider extensions, this is implemented by Apple in its first-party user interface of Finder. We actually had that in the past in our user interface but there were severe problems with the reliability and correctness of it, so it was removed with 4.0.0 to focus on improving the core of the client. 🫣 Maybe it will be restored for the file provider extension it the future, I see the justification of it, though, it is not of that high value and priority right now.

When there are no actual downloads and uploads (which are presented in Finder anyway), there is no point in a progress presentation because Metadata is synced kind of instant anyway. 😉

When the client connects to the server account for the first time, or after being disconnected (e.g. when the computer has been in sleep mode or switched off), the desktop client should index all new content so that Finder can catalogue and locate it without the user having to open folders manually.

As explained earlier, this behavior was replaced intentionally and there is no way to achieve the expected solution here without problems in more voluminous use cases. This is not just rooted in the nature of the WebDAV protocol but also that we cannot keep a single big BLOB with the complete and up-to-date presentation of the server-side file system state ready for every user as an initial payload. Especially not with all the other features like external storage integration on the server. 😬

you don’t have to wait for Finder to read the contents of every folder every time you open one.

This brings me to the spontaneous idea of using ls -laR to walk through a file provider domain recursively. 🤔 Accessing the folders in a shell session results in the same system calls on macOS which trigger folder content enumeration. Does that help in your case, maybe?

i2h3 avatar Apr 21 '26 08:04 i2h3

This brings me to the spontaneous idea of using ls -laR to walk through a file provider domain recursively. 🤔 Accessing the folders in a shell session results in the same system calls on macOS which trigger folder content enumeration. Does that help in your case, maybe?

Thanks for the tip, @i2h3! I ran this command: ls -laR ~/Library/CloudStorage/[email protected] > /dev/null, and it took a few hours to complete. While it was running, I checked Activity Monitor and saw that there was a lot of activity from the fileproviderd and mds processes

Once it had finished running, I could search for a file using Spotlight and got results for files within Nextcloud. That’s exactly what I wanted!

I then repeated the same command and it only took about 2 or 3 seconds! I suppose that once Finder has already scanned the contents of the folders, it runs much faster.

Now the question... to improve the user experience with large numbers of files, would it be possible to include an option in the settings – with a warning that it may take a long time and use a lot of bandwidth – so that the Nextcloud client runs that command at startup and/or when it detects new folders?

Many thanks!!!

ismasans avatar Apr 22 '26 08:04 ismasans

a lot of activity from the fileproviderd and mds processes

Then the file provider framework and extension are actively working while the Spotlight indexing (the "mds" process) is taking notes of it. 🙂

I then repeated the same command and it only took about 2 or 3 seconds!

The file provider extension, like our classic sync, checks the Tag of items for a change and it does not have to go through folders which have not changed internally.

would it be possible to include an option in the settings – with a warning that it may take a long time and use a lot of bandwidth – so that the Nextcloud client runs that command at startup and/or when it detects new folders?

Well, that is what #9351 is there for. Then macOS can ask our system to search for items which are not know yet locally but exist on the server. It is like outsourcing a search query to the remote server. That skips the long enumeration process. A complete manual recursion as a feature would a different issue from this one and I do not see its necessity when we have #9351.

i2h3 avatar Apr 22 '26 13:04 i2h3

Due to recent cases, I consider it important to indicate longer running metadata refreshes. When the client refreshes its locally cached metadata and the server is slow (in example for folders with thousands of items and a server response single page takes dozens of seconds to arrive), this appears like a stalled client.

i2h3 avatar Jul 31 '26 07:07 i2h3