mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-12 17:08:39 -09:00
No description
As aluded to in the previous commit. This approach keeps track of hard
links information much the same way as ncdu 1.16, with the main
difference being that the actual /counting/ of hard link sizes is
deferred until the scan is complete, thus allowing the use of a more
efficient algorithm and amortizing the counting costs.
As an additional benefit, the links listing in the information window
now doesn't need a full scan through the in-memory tree anymore.
A few memory usage benchmarks:
1.16 2.0-beta1 this commit
root: 429 162 164
backup: 3969 1686 1601
many links: 155 194 106
many links2*: 155 602 106
(I'm surprised my backup dir had enough hard links for this to be an
improvement)
(* this is the same as the "many links" benchmarks, but with a few
parent directories added to increase the tree depth. 2.0-beta1 doesn't
like that at all)
Performance-wise, refresh and delete operations can still be improved a
bit.
|
||
|---|---|---|
| LICENSES | ||
| src | ||
| .gitignore | ||
| build.zig | ||
| ChangeLog | ||
| Makefile | ||
| ncdu.pod | ||
| README.md | ||
ncdu-zig
Description
Ncdu is a disk usage analyzer with an ncurses interface. It is designed to find space hogs on a remote server where you don't have an entire graphical setup available, but it is a useful tool even on regular desktop systems. Ncdu aims to be fast, simple and easy to use, and should be able to run in any minimal POSIX-like environment with ncurses installed.
See the ncdu 2 release announcement for information about the differences between this Zig implementation (2.x) and the C version (1.x).
Requirements
- Zig 0.8
- Some sort of POSIX-like OS
- ncurses libraries and header files
Install
You can use the Zig build system if you're familiar with that.
There's also a handy Makefile that supports the typical targets, e.g.:
make
sudo make install PREFIX=/usr