You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using https://github.com/dundee/gdu for the last few years and started using dua now and really love it. However, one thing that I noticed is that dua doesn't seem to have any kind of caching to speed up results on subsequent runs. gdu seems to use some kind of caching to make it a lot faster on subsequent runs.
Perhaps some form of hashing and hash tables can be used to determine which file-system trees have changed since last run and only calculate those trees again, and use cached results for unchanged trees.
The text was updated successfully, but these errors were encountered:
It would probably be something along the lines of a .git/index, it would have to keep stat information for each directory, and it could skip checking the direct children of a directory if its mtime didn't change. This is, of course, making the assumption that the filesystem will correctly update this value.
In terms of implementation, I'd think the user has to call it with an argument that points to a path at which existing caches can be found, and where it can store the cache for the current run. Implementing this correctly isn't trivial, and all it can try to do is avoid stat calls based mtimes of directories. Maybe I am missing something though.
I've been using https://github.com/dundee/gdu for the last few years and started using
dua
now and really love it. However, one thing that I noticed is thatdua
doesn't seem to have any kind of caching to speed up results on subsequent runs.gdu
seems to use some kind of caching to make it a lot faster on subsequent runs.Perhaps some form of hashing and hash tables can be used to determine which file-system trees have changed since last run and only calculate those trees again, and use cached results for unchanged trees.
The text was updated successfully, but these errors were encountered: