Closed darkfeline closed 2 years ago
darkfeline @.***> writes:
Starting an async process for fast operations is clunky, so add a new option/feature for skipping async if the operation is fast.
I agree it is fast to copy small files or rename on same disk but is it really worth the effort to switch to a sync copy for such cases, it is perhaps slower to run an async process for such files, but how much do you win by running sync? Note also that if you use helm, C-u M-C/R switch to sync.
Thanks.
-- Thierry
Renaming a file in the same directory using dired-async hangs for a good 2-4 seconds (specifically, any async operation that finishes too quickly). So this saves me 2-4 seconds each rename.
I guess I always assumed that that's just how dired-async works (maybe it's waiting for a subprocess that already ended?), but maybe we should fix that bug instead? Assuming it is a bug and not WAI.
I don't use helm.
darkfeline @.***> writes:
Renaming a file in the same directory using dired-async hangs for a good 2-4 seconds (specifically, any async operation that finishes too quickly).
Can't reproduce this, it is instant for me here.
-- Thierry
Hm, this is going to be one of those tricky bugs to reproduce. I have a hunch it has to do with having NFS mounted buffers open.
For me there is also a delay with async that I don't experience with the built in renaming/copying in dired. I just added this code to my init to toggle between enabling and disabling async:
;; Async toggle
(defun vk-toggle-async ()
"Toggle enabling and disabling async"
(interactive)
(if (eq dired-async-mode nil)
(progn
(call-interactively 'dired-async-mode)
(message "Async enabled"))
(progn
(progn
(call-interactively 'dired-async-mode)
(message "Async disabled"))
)))
What about M-x dired-async-mode? ;-)
darkfeline @.***> writes: Renaming a file in the same directory using dired-async hangs for a good 2-4 seconds (specifically, any async operation that finishes too quickly). Can't reproduce this, it is instant for me here.
I can reproduce this with 100 % accuracy, but I have old drives (not SSD). My machine has pretty bad performance characteristics in general. Not sure what other details to give.
In any case, I'd appreciate if this was merged.
Ok merged.
Thanks!
Starting an async process for fast operations is clunky, so add a new option/feature for skipping async if the operation is fast. Same device renames are fast (since it's just a directory entry change) and renames and copys of small files are fast (arbitrarily picking 5 MB as the cutoff for modern computers/disks, can be configured).