- Feb 02, 2022
-
-
Yorhel authored
-
- Jan 01, 2022
-
-
Yorhel authored
-
- Dec 21, 2021
-
-
Yorhel authored
I'm tagging this as a "stable" 2.0 release because the 2.0-beta# numbering will get confusing when I'm working on new features and fixes. It's still only usable for people who can use the particular Zig version that's required (0.9.0 currently) and it will certainly break on different Zig versions. But once you have a working binary for a supported arch, it's perfectly stable.
-
Yorhel authored
-
- Nov 09, 2021
-
- Oct 06, 2021
-
-
Yorhel authored
Bit pointless to make these options nullable when you never assign null to them.
-
Yorhel authored
-
Yorhel authored
Not going to bloat the help output with all those settings...
-
Yorhel authored
Saves about 15k on the binary size. It does allocate a bit more, but it also frees the memory this time.
-
Yorhel authored
-
Yorhel authored
-
- Oct 05, 2021
-
-
Yorhel authored
+ reorder manpage a bit, since the scan options tend to be more relevant than all those UI options. Again, these are mainly useful with a config file.
-
Yorhel authored
The --enable-* options also work for imported files, this fixes #120. Most other options are not super useful on its own, but these will be useful when there's a config file.
-
- Sep 28, 2021
-
-
Yorhel authored
That was an oversight. Especially useless when there's no option to disable -x.
-
- Aug 16, 2021
-
- Jul 31, 2021
-
- Jul 26, 2021
-
-
Yorhel authored
While this simplifies the code a bit, it's a regression in the sense that it increases memory use. This commit is yak shaving for another hard link counting approach I'd like to try out, which should be a *LOT* less memory hungry compared to the current approach. Even though it does, indeed, add an extra cost of these parent node pointers.
-
- Jul 22, 2021
-
- Jul 18, 2021
-
-
Yorhel authored
-
- Jul 16, 2021
-
-
Yorhel authored
-
- Jul 14, 2021
-
-
Yorhel authored
-
- Jul 13, 2021
-
-
Yorhel authored
This complicated the scan code more than I had anticipated and has a few inherent bugs with respect to calculating shared hardlink sizes. Still, the merge approach avoids creating a full copy of the subtree, so that's another memory usage related win compared to the C version. On the other hand, it does leak memory if nodes can't be reused. Not quite as well tested as I should have, so I'm sure there's bugs.
-
- May 30, 2021
-
-
Yorhel authored
-
- May 29, 2021
-
-
Yorhel authored
-
Yorhel authored
In a similar way to the C version of ncdu: by wrapping malloc(). It's simpler to handle allocation failures at the source to allow for easy retries, pushing the retries up the stack will complicate code somewhat more. Likewise, this is a best-effort approach to handling OOM, allocation failures in ncurses aren't handled and display glitches may occur when we get an OOM inside a drawing function. This is a somewhat un-Zig-like way of handling errors and adds scary-looking 'catch unreachable's all over the code, but that's okay.
-
Yorhel authored
Performance is looking great, but the code is rather ugly and potentially buggy. Also doesn't handle hard links without an "nlink" field yet. Error handling of the import code is different from what I've been doing until now. That's intentional, I'll change error handling of other pieces to call ui.die() directly rather than propagating error enums. The approach is less testable but conceptually simpler, it's perfectly fine for a tiny application like ncdu.
-
- May 24, 2021
-
-
Yorhel authored
-
- May 23, 2021
-
-
Yorhel authored
I plan to add more display options, but ran out of keys to bind. Probably going for a quick-select menu thingy so that we can keep the old key bindings for people accustomed to it. The graph width algorithm is slightly different, but I think this one's a minor improvement.
-
- May 12, 2021
-
- May 09, 2021
-
-
Yorhel authored
-
- May 07, 2021
-
-
Yorhel authored
Now we're getting somewhere. This works surprisingly well, too. Existing ncdu behavior is to remember which entry was previously selected but not which entry was displayed at the top, so the view would be slightly different when switching directories. This new approach remembers both the entry and the offset.
-
Yorhel authored
-
- May 06, 2021
-
-
Yorhel authored
I initially wanted to keep a directory's block count and size as a separate field so that exporting an in-memory tree to a JSON dump would be easier to do, but that doesn't seem like a common operation to optimize for. We'll probably need the algorithms to subtract sub-items from directory counts anyway, so such an export can still be implemented, albeit slower.
-
- May 05, 2021
-
-
Yorhel authored
libc locale-dependent APIs are pure madness, but I can't avoid them as long as I use ncurses. libtickit seems like a much saner alternative (at first glance), but no popular application seems to use it. :(
-
- May 03, 2021
-
-
Yorhel authored
Eaiser to implement now that we're linking against libc. But exclude pattern matching is extremely slow, so that should really be rewritten with a custom fnmatch implementation. It's exactly as slow as in ncdu 1.x as well, I'm surprised nobody's complained about it yet. And while I'm at it, supporting .gitignore-style patterns would be pretty neat, too.
-
Yorhel authored
I tried playing with zbox (pure Zig termbox-like lib) for a bit, but I don't think I want to have to deal with the terminal support issues that will inevitably come with it. I already stumbled upon one myself: it doesn't properly put the terminal in a sensible state after cleanup in tmux. As much as I dislike ncurses, it /is/ ubiquitous and tends to kind of work.
-
- May 01, 2021
-
-
Yorhel authored
-
- Apr 29, 2021
-
-
Yorhel authored
-
Yorhel authored
The new data model is supposed to solve a few problems with ncdu 1.x's 'struct dir': - Reduce memory overhead, - Fix extremely slow counting of hard links in some scenarios (issue #121) - Add support for counting 'shared' data with other directories (issue #36) Quick memory usage comparison of my root directory with ~3.5 million files (normal / extended mode): ncdu 1.15.1: 379M / 451M new (unaligned): 145M / 178M new (aligned): 155M / 200M There's still a /lot/ of to-do's left before this is usable, however, and there's a bunch of issues I haven't really decided on yet, such as which TUI library to use. Backporting this data model to the C version of ncdu is also possible, but somewhat painful. Let's first see how far I get with Zig.
-