coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

cp: Intermediate progress for large files

Open jp-systango opened this issue 2 years ago • 5 comments

  • The file size should be larger than 500 mb
  • Integrated with progress bar option

#4528

jp-systango avatar Oct 10 '23 13:10 jp-systango

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 avatar Oct 22 '23 13:10 tertsdiepraam

@tertsdiepraam have you been able to investigate the perf ? :)

sylvestre avatar Dec 23 '23 09:12 sylvestre

Not yet :(

tertsdiepraam avatar Dec 23 '23 09:12 tertsdiepraam

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`

sylvestre avatar Dec 25 '23 10:12 sylvestre

@jp-systango are you still interested in finishing this? thanks

sylvestre avatar Apr 21 '24 07:04 sylvestre