mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[GH-ISSUE #85] Any room for performance improvement? #32
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 @kawpii on GitHub (Mar 24, 2020).
Original GitHub issue: https://github.com/bootandy/dust/issues/85
Benchmark
dustis ~3x slower thandubut ~2.5x faster thanduetreeImprovement suggestions from https://github.com/nachoparker/dutree/issues/18 may apply
@bootandy commented on GitHub (Mar 25, 2020):
We moved from walkdir to jwalk because jwalk was faster for large filesystems. jwalk can run in parallel walkdir can't.
I have a branch where I have moved from jwalk to Burntsushi's ignore crate which seems to be even faster than jwalk.
I don't think I can remove any more sys calls but please feel free to show me where I can.
We already use pointers for the tree structure, we don't clone the objects
One way we could improve performance for the base case is to stop sorting the output and instead search linearly for the k largest objects but I think that improvement would be very minor in practice.
@bootandy commented on GitHub (Mar 25, 2020):
Todo: Try passing round DirEntry objects instead of Path objects.