rfd
rfd copied to clipboard
Rfd, uses 100% of one CPU core on Windows
Project czkawka/krokiet uses the following dependency:
rfd = { version = "0.15", default-features = false, features = ["xdg-portal", "async-std"] }
rfd version "0.15.4"
rfd usage
let file_dialog = FileDialog::new().set_directory(directory);
let Some(folders) = file_dialog.pick_folders() else {
return;
};
One user reported that opening the file-chooser dialog on Windows causes a single CPU core to spike to 100%. After closing the dialog, CPU usage returns to normal.
Issue link: https://github.com/qarmin/czkawka/issues/1641
Open krokiet and click "Add folder" button in lower left corner. Then the CPU usage will be high and the folder-picking dialog is very laggy.
After I close the dialog, CPU usage will go back down to 2%.
Can not reproduce:
fn main() {
let path = std::env::current_dir().unwrap();
let res = rfd::FileDialog::new()
.set_directory(&path)
.pick_folders();
println!("The user choose: {:#?}", res);
}
Dialog is responsive, and uses barely any CPU.