coreutils
coreutils copied to clipboard
cp: Intermediate progress for large files
- The file size should be larger than 500 mb
- Integrated with progress bar option
#4528
Hi! Looks cool! I think what we want here is to always do the same thing without braching on the progress bar. The reason is that otherwise the progress bar determines the underlying syscalls that are performed and the behaviour might accidentally diverge. If we do that, then your method will also be tested by the GNU tests and we can verify that it really does the right thing.
Edit: I see @sylvestre had the opposite opinion in the issue. @sylvestre is that still the case or do you agree with what I'm saying here?
I'll also try running some benchmarks soon on this, because I'm still confused about the results you posted (I do believe you, it's just that I want to investigate further :smile:).
Someone in the nushell discord just requested this feature too btw, so you're helping people out a lot here!
@tertsdiepraam have you been able to investigate the perf ? :)
Not yet :(
Fails on Windows with:
error[E0599]: no method named `read_at` found for struct `File` in the current scope
--> src\uu\cp\src/cp.rs:2031:32
|
2031 | let read = source_file.read_at(&mut buffer, written as u64)?;
| ^^^^^^^ method not found in `File`
@jp-systango are you still interested in finishing this? thanks