feat: v0.2.0 - Performance optimization and distribution pipeline

- Implemented multi-threaded directory traversal using ignore::WalkParallel
- Added dynamic thread allocation for balanced CPU utilization
- Refactored core logic to single-pass, in-memory tree construction (O(N))
- Added --compare, --units, and --precision flags
- Established SCM-neutral distribution pipeline (Makefile, release.sh, Homebrew)
- Comprehensive updates to README.md, MANUAL.md, and CHANGELOG.md
- Decoupled from SCM-specific workflows
This commit is contained in:
2026-01-22 15:00:48 -05:00
parent db9059e2fc
commit 276c6404a9
13 changed files with 763 additions and 138 deletions
+34 -26
View File
@@ -7,36 +7,44 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.2.0] - 2026-01-22
### Changed
- Refactored core traversal logic to a **single-pass, in-memory tree construction** algorithm. This visits every file exactly once, replacing the previous $O(N \times Depth)$ behavior with $O(N)$.
- Switched default CSV output to use the `csv` crate for robust escaping (fixes issues with filenames containing commas).
- Optimized JSON output to use zero-copy serialization, improving performance and memory usage.
### Added
- Added `MANUAL.md` with comprehensive usage documentation.
- Added comprehensive test suite (unit and integration tests).
- Added performance benchmarks using `criterion`.
- **Comparison Mode**: Added `--compare` flag to display total size vs. non-ignored size (respecting `.gitignore`).
- **Unit Control**: Added `--units <binary|decimal>` flag to toggle standard IEC (MiB) vs. SI (MB) unit systems.
- **Precision Control**: Added `--precision <number>` to control decimal places in output (default: 2).
- **Physical vs. Logical Distinction**: Explicitly show **Apparent Size** (logical) and **Disk Usage** (actual blocks consumed) in all output formats.
- **Release Assets**:
- Project **Makefile** for easy system-wide installation via `make install`.
- Universal **`scripts/release.sh`** for generating optimized binaries, man pages, shell completions, and `.deb` packages.
- Official **man page** (`sized.1`) for standard Unix documentation documentation.
- Updated **Homebrew Formula** for tap-based distribution.
- **Improved Errors**: Graceful handling for inaccessible directories (e.g., system protected folders) with "Access Denied" status.
- Added a full user guide in `MANUAL.md`.
### Changed
- **Performance Overhaul**:
- Replaced serial/par-bridge traversal with `ignore::WalkParallel` for true multi-threaded directory scanning.
- Implemented **dynamic thread allocation** to balance CPU load between directory breadth and depth.
- Refactored core logic to a **single-pass, in-memory tree construction** algorithm ($O(N)$ complexity).
- **Architecture**: Refactored the project into a usable Rust library (`src/lib.rs`) and a thin CLI wrapper (`src/main.rs`).
- **Dependencies**:
- Switched to `byte-unit` for more flexible and accurate unit formatting.
- Replaced `walkdir` with `ignore` for faster traversal and native `.gitignore` support.
- Replaced `atty` and `chrono` with standard library features and the lightweight `time` crate.
- **Serialization**: Optimized JSON and CSV output for zero-copy performance and detailed metric reporting.
### Fixed
- Resolved performance bottleneck in extremely deep directory structures.
- Fixed inconsistent total size reporting when `.gitignore` was active.
### Removed
- Removed `walkdir` dependency (replaced by `ignore::WalkBuilder` for all traversal).
- Removed `humansize` (consolidated to `byte-unit`).
- Removed `chrono` (replaced with lightweight `time`).
- Removed `atty` (unused).
- Dependency on `walkdir`, `humansize`, `chrono`, and `atty`.
## [0.1.0] - 2026-01-22
### Added
- Core directory traversal and size calculation logic.
- Parallel processing using `rayon` for high performance.
- Rich table output format using `comfy-table` with colored entries.
- Recursive depth control via `-d`/`--depth`.
- Minimum size filtering via `-m`/`--min-size`.
- Multi-column sorting support (`--sort`).
- Relative path display by default, with `-f`/`--path-full` override.
- "Total size" summary with dual units (Binary/Decimal) and block counts.
- Concurrency control via `-j`/`--threads`.
- `.gitignore` and `.ignore` file support via `-i`/`--ignore`.
- Multiple output formats: Text (Table), CSV, JSON (`--format`).
- Save to file functionality with auto-naming (`--save`).
- Shell completion generation (`--completions`).
- Initial release with core directory traversal and size calculation.
- Basic parallel processing using `rayon`.
- Rich table output via `comfy-table`.
- Basic filtering (`--min-size`, `--depth`) and sorting (`--sort`).
- Output format support: Text, CSV, and JSON.
- Save to file and shell completion generation.