mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[GH-ISSUE #415] Fix slowdown in new version #178
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bootandy on GitHub (Jul 17, 2024).
Original GitHub issue: https://github.com/bootandy/dust/issues/415
Tests with hyperfine show that this PR means we are running ~ 40% slower than the v1.0.0 release.
https://github.com/bootandy/dust/pull/399
@bootandy commented on GitHub (Jul 17, 2024):
Ok, I've traced the problem down to 2 places.
If no filters are entered we always apply this filter: - meaning we always have to check it which we never did before
None => (Operater::GreaterThan, 0),The Moving of this line down a bit in dir_walker.rs (it is needed because having it is faster than a file lookup).
if !walk_data.allowed_filesystems.is_empty()@bootandy commented on GitHub (Jul 17, 2024):
https://github.com/bootandy/dust/pull/417
@wugeer commented on GitHub (Jul 17, 2024):
Yes, you are right. I'm sorry that this PR of mine caused the performance to drop so much. I will revisit the performance of my code!
@bootandy commented on GitHub (Jul 17, 2024):
No problem, We live and learn. I should have checked more.