Commit graph

11 commits

Author SHA1 Message Date
Gwen Lg
b0e89cd5e3
fix some typos in comment or var name (#1027)
indicated by `typos` tool : https://github.com/crate-ci/typos/
2025-06-18 16:40:55 -06:00
Jeremy Soller
72c7374d4c
Ignore failures to set permissions when copying, fixes #909 2025-05-15 11:40:59 -06:00
Jeremy Soller
5573e36400
Copy to external drives when drag and dropping, part of #828 2025-04-29 18:07:57 -06:00
Jeremy Soller
d6f1efbf67
Only write what was read during copy, fixes #931 2025-04-10 18:14:24 -06:00
Michael Murphy
79aa8f887a
feat: use io_uring / IOCP when available for async file IO (#911)
Spawns a single thread for handling async file IO on the [compio runtime](https://github.com/compio-rs/compio).
It is a completion-based IO runtime that can dynamically select a polling mechanism at runtime. It defaults to
io_uring on Linux, IOCP on Windows, and the polling crate everywhere else. On Linux systems where io_uring is
unavailable or disabled, it will fall back to the polling crate.

This eliminates most of the threads that were needed previously. It significantly reduced the amount of memory
needed in the recursive Context to get a good transfer rate for each copy operation—from a 4 MB buffer to 128 KB.
Copies on a nvme drive are somewhat faster with the async IO changes, and use less CPU than before.

Although it uses a single thread for non-blocking tasks, it still manages to 100% max out my nvme drive's
activity for the whole duration of multiple long transfers. But it would be possible to enable compio's
dispatcher to spread operations across worker threads if necessary.

All but the extract and compress operations were updated to be async. I had to switch the `CondVar` in the
`Controller` to a `tokio::sync::Notify` to prevent the IO thread from being put to sleep when an operation is paused.
Fixed a deadlock in the `operation_copy` test function that was performing an operation without concurrently pulling
from the channel in the operation. Reduced the rate that `Message::None` is sent from a subscription to trigger a UI
redraw, and fixed it to not run when operations are paused.
2025-04-09 15:15:07 -06:00
Jeremy Soller
40a02bb2fc
Ensure skip applies to cleanup operations, fixes #854 2025-03-07 09:29:48 -07:00
Josh Megnauth
df2d01e9ba chore(clippy): thumbnailer.rs, two files in operation
Fixes Clippy lints for:
* src/thumbnailer.rs
* src/operation/mod.rs
* src/operation/recursive.rs

One of the Clippy lints also involved fixing a TODO to replace a
deprecated function that malfunctioned under Windows.
2025-01-19 10:55:41 -07:00
Jeremy Soller
24a7f2bc31
Select result of operation, fixes #500 2024-11-19 20:17:58 -07:00
Jeremy Soller
2109c8c3d6
Implement pause for operations 2024-11-15 09:47:03 -07:00
Jeremy Soller
00ed3115cc
Implement progress notification and cancellation 2024-11-14 14:43:45 -07:00
Jeremy Soller
a32f25fa95
Remove fs_extra (#655)
* WIP Remove fs_extra

* Finish removing fs_extra
2024-11-13 14:36:11 -07:00