[GH-ISSUE #272] dust got significantly slower with version 0.8.1 #120

Closed
opened 2026-06-08 11:25:46 +03:00 by zhus · 3 comments
Owner

Originally created by @SpyrosRoum on GitHub (Oct 31, 2022).
Original GitHub issue: https://github.com/bootandy/dust/issues/272

OS: Arch Linux 6.0.6-zen1-1-zen x86_64

Hello, it seems that dust got slower recently.

To be more precise I run sudo dust -X home /, a little while ago this would finish within a few seconds (maybe around 30) but now it was left for a few hours and still didn't finish, pinning all my cores (Ryzen 5 5600X) to 100%

I downloaded and tried different versions and the last one that worked was v0.8.0.

Mind you all versions work if I run them in e.x. my home directory, but not in root.

Edit with some more info:
It seems like it still worked fine on alpha-2, so it must be something in these commits.

Originally created by @SpyrosRoum on GitHub (Oct 31, 2022). Original GitHub issue: https://github.com/bootandy/dust/issues/272 OS: Arch Linux 6.0.6-zen1-1-zen x86_64 Hello, it seems that dust got slower recently. To be more precise I run `sudo dust -X home /`, a little while ago this would finish within a few seconds (maybe around 30) but now it was left for a few hours and still didn't finish, pinning all my cores (Ryzen 5 5600X) to 100% I downloaded and tried different versions and the last one that worked was v0.8.0. Mind you all versions work if I run them in e.x. my home directory, but not in root. Edit with some more info: It seems like it still worked fine on alpha-2, so it must be something in [these](https://github.com/bootandy/dust/compare/v0.8.1-alpha.2...v0.8.1) commits.
zhus closed this issue 2026-06-08 11:25:46 +03:00
Author
Owner

@bootandy commented on GitHub (Nov 9, 2022):

I can't replicate this.

Is it the root directory:
dust -X home /
or the fact that it is run as root:
sudo dust

that is making it slow? (Or does it require both to be slow)?

<!-- gh-comment-id:1307968447 --> @bootandy commented on GitHub (Nov 9, 2022): I can't replicate this. Is it the root directory: dust -X home / or the fact that it is run as root: sudo dust that is making it slow? (Or does it require both to be slow)?
Author
Owner

@SpyrosRoum commented on GitHub (Nov 9, 2022):

Running as root or not doesn't seem to make a difference, latest dust gets stuck regardless.

When running in the home directory instead of root, dust81a2 (dust v0.8.1-alpha2) is consistently faster.

Here is a comparison using hyperfine:

$ hyperfine --warmup 1 "dust ~/"
Benchmark 1: dust ~/
  Time (mean ± σ):     863.4 ms ±  18.9 ms    [User: 1723.7 ms, System: 3764.5 ms]
  Range (min … max):   841.9 ms … 910.1 ms    10 runs

vs

$ hyperfine --warmup 1 "dust81a2 ~/"
Benchmark 1: dust81a2 ~/
  Time (mean ± σ):     801.2 ms ±  17.4 ms    [User: 2230.6 ms, System: 3762.8 ms]
  Range (min … max):   783.9 ms … 832.0 ms    10 runs

I used --warmup 1 because the first time I run hyperfine dust ~/ the first run was significantly slower (close to 7 seconds), I'm not sure what gets cached where or how to invalidate it but dust81a2 (that I run after dust) didn't have that issue, so --warmup 1
should make things fair regardless.

Notice that dust81a2 is faster by roughly 60ms, while the slowest run of dust81a2 is still faster than the fastest run of dust by about 10ms.

I'm not sure if that slow down is related to dust never finishing when running in root or not, could be different issues.

<!-- gh-comment-id:1308749170 --> @SpyrosRoum commented on GitHub (Nov 9, 2022): Running as root or not doesn't seem to make a difference, latest dust gets stuck regardless. When running in the home directory instead of root, `dust81a2` (dust v0.8.1-alpha2) is consistently faster. Here is a comparison using [hyperfine](https://github.com/sharkdp/hyperfine): ``` $ hyperfine --warmup 1 "dust ~/" Benchmark 1: dust ~/ Time (mean ± σ): 863.4 ms ± 18.9 ms [User: 1723.7 ms, System: 3764.5 ms] Range (min … max): 841.9 ms … 910.1 ms 10 runs ``` vs ``` $ hyperfine --warmup 1 "dust81a2 ~/" Benchmark 1: dust81a2 ~/ Time (mean ± σ): 801.2 ms ± 17.4 ms [User: 2230.6 ms, System: 3762.8 ms] Range (min … max): 783.9 ms … 832.0 ms 10 runs ``` I used `--warmup 1` because the first time I run `hyperfine dust ~/` the first run was significantly slower (close to 7 seconds), I'm not sure what gets cached where or how to invalidate it but dust81a2 (that I run after dust) didn't have that issue, so `--warmup 1` should make things fair regardless. Notice that `dust81a2` is faster by roughly 60ms, while the slowest run of `dust81a2` is still faster than the fastest run of `dust` by about 10ms. I'm not sure if that slow down is related to dust never finishing when running in root or not, could be different issues.
Author
Owner

@bootandy commented on GitHub (Nov 7, 2023):

Current version:

hyperfine --warmup 1 "dust  ~/dev"   
Benchmark 1: dust  ~/dev
  Time (mean ± σ):     470.2 ms ±  10.6 ms    [User: 751.9 ms, System: 1772.4 ms]
  Range (min … max):   453.4 ms … 485.4 ms    10 runs
git checkout 5103ebe (version dust v0.8.2)
cargo build --release  

 hyperfine --warmup 1 "target/release/dust  ~/dev"
Benchmark 1: target/release/dust  ~/dev
  Time (mean ± σ):     513.3 ms ±  26.6 ms    [User: 872.9 ms, System: 1819.1 ms]
  Range (min … max):   493.6 ms … 573.3 ms    10 runs
git checkout fabb27908d57b8f2f82b5e0bb35b3d9ed158e3ba                (version dust v0.8.0)
cargo build --release  
$ hyperfine --warmup 1 "target/release/dust  ~/dev"                                [23:18:07]
Benchmark 1: target/release/dust  ~/dev
  Time (mean ± σ):     525.5 ms ±  56.7 ms    [User: 969.9 ms, System: 1847.4 ms]
  Range (min … max):   474.9 ms … 667.3 ms    10 runs

I'm sufficiently happy with any performance differences.

<!-- gh-comment-id:1797017411 --> @bootandy commented on GitHub (Nov 7, 2023): Current version: ``` hyperfine --warmup 1 "dust ~/dev" Benchmark 1: dust ~/dev Time (mean ± σ): 470.2 ms ± 10.6 ms [User: 751.9 ms, System: 1772.4 ms] Range (min … max): 453.4 ms … 485.4 ms 10 runs ``` ``` git checkout 5103ebe (version dust v0.8.2) cargo build --release hyperfine --warmup 1 "target/release/dust ~/dev" Benchmark 1: target/release/dust ~/dev Time (mean ± σ): 513.3 ms ± 26.6 ms [User: 872.9 ms, System: 1819.1 ms] Range (min … max): 493.6 ms … 573.3 ms 10 runs ``` ``` git checkout fabb27908d57b8f2f82b5e0bb35b3d9ed158e3ba (version dust v0.8.0) cargo build --release $ hyperfine --warmup 1 "target/release/dust ~/dev" [23:18:07] Benchmark 1: target/release/dust ~/dev Time (mean ± σ): 525.5 ms ± 56.7 ms [User: 969.9 ms, System: 1847.4 ms] Range (min … max): 474.9 ms … 667.3 ms 10 runs ``` I'm sufficiently happy with any performance differences.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#120