No description
Find a file
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
.github Add issue template 2024-08-27 15:54:25 -06:00
cosmic-files-applet chore: upgrade dependencies 2025-02-19 18:14:31 +01:00
debian fix(debian): add libxkbcommon-dev 2024-05-18 01:57:48 +02:00
examples feat: use io_uring / IOCP when available for async file IO (#911) 2025-04-09 15:15:07 -06:00
i18n Refactor translation (#923) 2025-04-08 08:06:20 -06:00
res i18n (pt-BR) Update translation 2025-03-25 22:35:35 -03:00
samples Add mode samples 2025-02-12 10:44:53 -07:00
scripts Remove fs_extra (#655) 2024-11-13 14:36:11 -07:00
src feat: use io_uring / IOCP when available for async file IO (#911) 2025-04-09 15:15:07 -06:00
.gitignore Add just flamegraph target 2024-11-14 09:28:28 -07:00
build.rs Shorten hash in UI 2024-02-28 13:35:29 -07:00
Cargo.lock feat: use io_uring / IOCP when available for async file IO (#911) 2025-04-09 15:15:07 -06:00
Cargo.toml feat: use io_uring / IOCP when available for async file IO (#911) 2025-04-09 15:15:07 -06:00
i18n.toml Basic implementation 2024-01-03 15:27:32 -07:00
justfile Add just flamegraph target 2024-11-14 09:28:28 -07:00
LICENSE Initial commit 2024-01-03 13:34:32 -07:00
README.md Update README.md 2024-02-20 09:58:00 -07:00

cosmic-files

File manager for the COSMIC desktop environment

Note

This project is still a work in progress

Build the project from source

# Clone the project using `git`
git clone https://github.com/pop-os/cosmic-files
# Change to the directory that was created by `git`
cd cosmic-files
# Build an optimized version using `cargo`, this may take a while
cargo build --release
# Run the optimized version using `cargo`
cargo run --release

Community and Contributing

The COSMIC desktop environment is maintained by System76 for use in Pop!_OS. A list of all COSMIC projects can be found in the cosmic-epoch project's README. If you would like to discuss COSMIC and Pop!_OS, please consider joining the Pop!_OS Chat. More information and links can be found on the Pop!_OS Website.

License

This project is licensed under GPLv3