Skip to content
Snippets Groups Projects
  1. Oct 06, 2021
  2. Oct 05, 2021
  3. Sep 28, 2021
  4. Aug 16, 2021
  5. Jul 31, 2021
  6. Jul 28, 2021
    • Yorhel's avatar
    • Yorhel's avatar
      Fix Dir.fmtPath() when given the root dir · ba14c093
      Yorhel authored
      ba14c093
    • Yorhel's avatar
      3acab71f
    • Yorhel's avatar
      Implement a more efficient hard link counting approach · 0d314ca0
      Yorhel authored
      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.
      0d314ca0
  7. Jul 26, 2021
    • Yorhel's avatar
      Add parent node pointers to Dir struct + remove Parents abstraction · 36bc405a
      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.
      36bc405a
  8. Jul 23, 2021
  9. Jul 22, 2021
  10. Jul 19, 2021
  11. Jul 18, 2021
  12. Jul 16, 2021
  13. Jul 14, 2021
  14. Jul 13, 2021
    • Yorhel's avatar
      Implement directory refresh · 6c2ab500
      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.
      6c2ab500
  15. Jul 06, 2021
    • Yorhel's avatar
      Add link path listing to information window · ff3e3bcc
      Yorhel authored
      Two differences compared to the C version:
      - You can now select individual paths in the listing, pressing enter
        will open the selected path in the browser window.
      - Creating this listing is much slower and requires, in the worst case,
        a full traversal through the in-memory tree. I've tested this without
        the same-dev and shared-parent optimizations (i.e. worst case) on an
        import with 30M files and performance was still quite acceptable - the
        listing completed in a second - so I didn't bother adding a loading
        indicator. On slower systems and even larger trees this may be a
        little annoying, though.
      
      (also, calling nonl() apparently breaks detection of the return key,
      neither \n nor KEY_ENTER are emitted for some reason)
      ff3e3bcc
  16. Jun 11, 2021
    • Yorhel's avatar
      Add item info window · 618972b8
      Yorhel authored
      Doesn't display the item's path anymore (seems rather redundant) but
      adds a few more other fields.
      618972b8
  17. Jun 07, 2021
    • Yorhel's avatar
      Add workaround for Zig bug on FreeBSD · d910ed8b
      Yorhel authored
      The good news is: apart from this little thing, everything seems to just
      work(tm) on FreeBSD. Think I had more trouble with C because of minor
      header file differences.
      d910ed8b
    • Yorhel's avatar
      Update for Zig 0.8 HashMap changes · 40f9dff5
      Yorhel authored
      I had used them as a HashSet with mutable keys already in order to avoid
      padding problems. This is not always necessary anymore now that Zig's
      new HashMap uses separate arrays for keys and values, but I still need
      the HashSet trick for the link_count nodes table, as the key itself
      would otherwise have padding.
      40f9dff5
  18. Jun 01, 2021
  19. May 30, 2021
  20. May 29, 2021
Loading