kamiyaa / joshuto

ranger-like terminal file manager written in Rust
https://crates.io/crates/joshuto
GNU Lesser General Public License v3.0
3.4k stars 150 forks source link

Joshuto stuck at heavy I/O task like copying & pasting large files #347

Open awerty-noob opened 1 year ago

awerty-noob commented 1 year ago

Joshuto could froze when I copy some large file (above 1G). It would be fantastic if copy/paste/etc. can be handled by another process instead of main one, avoiding the possible stuck. As far as I know, lf file manager uses the backend/frontend to seperate the TUI with the I/O tasks. Does Joshuto has plan on this?

asim215 commented 1 year ago

Same problem with my system when moving files from NVMe to HDD. CPU 1 core load is 100%. Where when I using mv in shell is almost no load on CPU.

kamiyaa commented 1 year ago

This is something that definitely needs fixing. Just not exactly sure how to go about this yet.

From my understanding: File operations are coded to be on separate threads. However, after the cut/copy operation is complete, the main thread is coded to try to join the file operation thread. This is to ensure these threads exit cleanly. However, for reason I'm not sure of, the join process takes a long time even though the thread is done.