github Byron/dua-cli dua-core-v4.2.0
dua-core v4.2.0

3 hours ago

New Features

  • make walk result buffering configurable per worker

    Replace the fixed QUEUED_BATCHES_PER_WORKER constant with
    Options::queued_batches_per_worker and a chainable builder method. Use
    two queued batches per worker by default in both production and tests,
    preserving the original bounded buffering behavior.

    Consumers that pause to process entries can opt into a larger queue to
    keep traversal workers busy, trading memory for less idle time. A value
    of zero selects an unbuffered channel. Check the worker-count
    multiplication so excessive capacities cannot silently overflow.

    Update existing Options literals to inherit the new default. Verify the
    actual queue capacity with one and two workers, and exercise larger and
    unbuffered queues through the public single-root and multi-root walkers.

Bug Fixes

  • pass strict workspace Clippy on Rust 1.99

    Replace empty-container assertions with equality comparisons and empty
    string checks with inequality comparisons. This satisfies Clippy's
    assert_is_empty lint while showing actual values when assertions fail.

    Locally allow the deprecated fetch_update alias in directory identifier
    allocation. Its replacement, try_update, requires Rust 1.95, while
    dua-core supports Rust 1.88. Preserve the existing atomic update and
    overflow handling without raising the minimum supported Rust version.

  • keep verbatim paths verbatim when resolving relative paths on Windows
    When the current directory is verbatim (e.g. after dua "\\?\D:\dir"
    chdirs into a verbatim input path, or when dua runs from a verbatim cwd),
    absolute_verbatim_path resolved relative paths like "." into an
    already-verbatim absolute path, then fed it into the generic \\ (UNC)
    branch and produced \\?\UNC\?\D:\dir. CreateFileW on that path fails
    with ERROR_BAD_NETPATH (os error 53), so dua/dua aggregate could not
    enumerate \\?\ directories at all.

    An absolute path that already carries a \\?\ or \??\ prefix is now
    passed through untouched, matching Win32 verbatim semantics; \\.\,
    UNC and ordinary local paths are unchanged.

    Fixes #406

Performance

  • let walk workers queue more batches ahead of the iterator
    The result channel held threads * 2 batches. When the iterator's
    consumer pauses, each worker that finishes a batch then blocks until
    the consumer drains the channel, so the walk stops whenever the
    consumer is busy. A consumer that does real work per entry, such as
    parsing some of the files it's handed, spends much of its time waiting
    on workers that sat idle while it worked.

    Allow 128 batches per worker instead. The channel stays bounded, and
    dua aggregate is no slower. The unit tests that block a worker on a
    full channel fill two batches to do it, so they keep that bound.

Commit Statistics

  • 6 commits contributed to the release.
  • 31 days passed between releases.
  • 4 commits were understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized
    • Merge pull request #413 from dduugg/buffer-batches-ahead-of-consumer (4179fe2)
    • Pass strict workspace Clippy on Rust 1.99 (afbe487)
    • Make walk result buffering configurable per worker (2989d30)
    • Let walk workers queue more batches ahead of the iterator (4ca76e1)
    • Merge pull request #407 from Mathjk/fix/verbatim-path (8f8d25b)
    • Keep verbatim paths verbatim when resolving relative paths on Windows (1ec599f)

Don't miss a new dua-cli release

NewReleases is sending notifications on new releases.