-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix stack overflow that occurred with deeply nested directories #28
base: master
Are you sure you want to change the base?
Conversation
By the way, the only reason I used |
Also, this is only sort of related to this PR, but on my relatively old MacBook Pro, using |
Thank you very much for your contribution. I did not have time to look into this, but I am planning to do so soon. |
No problem, take your time. |
I finally had some time to look into this. First of all, thanks again for your PR!
Why do you say "should"? Are you able to reproduce the originally filed issue? I tried to trigger the underlying issue today with this small script: #!/bin/bash
set -e
base="/tmp/deeply_nested"
rm -rf "$base"
path="$base"
for _ in {1..2034}; do
path="$path/a"
done
mkdir -p "$path"
dd if=/dev/zero of="$path/file_1MB" bs=1024 count=1024
(
cd "$base"
du -sb
diskus
) It creates a very deeply nested directory I could try to find other filesystems without this limit or try to decrease the stack size of
Thank you, but I don't think we have to worry about API stability for now.
Hm 🙁… I was afraid that the measurements on my machine would not extrapolate to other scenarios. It would be great to get some results from your laptop (only if you find the time). Using hyperfine \
--warmup 2 \
--export-csv "diskus_benchmark.csv" \
--export-markdown "diskus_benchmark.md" \
--parameter-scan j 1 20 \
"diskus -j {j}" Concerning your PR, I did run some benchmarks on my machine and it looks like the |
I basically meant barring any bugs that I did not catch.
The issue occurred when running Also, AFAIK, the 4096 character limit is usually not an actual limit. Linux (for example) can handle much larger paths, although it causes problems with some functions.
Alright, I’ll remove
I’ll try to test today or tomorrow. I’ll see if I can test it on another computer too. |
This branch has conflicts that must be resolved |
This should fix #27. I basically removed
rayon
and handled the threads manually usingcrossbeam
. I also took the liberty to make thediskus
binary use thediskus
library instead of justmod
ingwalk.rs
.