spacedriveapp / spacedrive

Spacedrive is an open source cross-platform file explorer, powered by a virtual distributed filesystem written in Rust.
https://spacedrive.com
GNU Affero General Public License v3.0
29.33k stars 835 forks source link

Eng 1159: report progress when copying files #2538

Open matheus-consoli opened 3 weeks ago

matheus-consoli commented 3 weeks ago

This fixes the reporting of progress when copying files.

The initial idea was to split the file into chunks and, at every couple of chunks transmitted, we would emit an event reporting the progress of the current copy.

But that proved a poor approach and didn't pay for its unnecessary complexity.

The current implementation (WIP), uses a less intrusive metric: spawn jobs for tokio::fs::copy the file; and another job that periodically checks the destiny file's metadata and estimates the progress - this is less precise but more efficient.

vercel[bot] commented 3 weeks ago

@matheus-consoli is attempting to deploy a commit to the Spacedrive Team on Vercel.

A member of the Team first needs to authorize it.