v2.40
Core Performance & Memory Optimization
- Structure of Arrays (SoA): Replaced object-based data model with SoA architecture to eliminate per-file object overhead and maximize CPU cache locality.
- Zero-Allocation I/O: Switched from
FileStreamtoSystem.IO.RandomAccessfor direct "disk-to-memory" pipelining. - Reduced GC Pressure: Implemented
System.Buffers.ArrayPool<byte>for buffer reuse andSystem.Threading.Channelsto recycle memory buffers. - String Pooling: Implemented a custom String Pool utilizing .NET 10's
AlternateLookupto deduplicate repetitive path strings. - Optimized Hashing: Hoisted hashing buffers and algorithm instances to thread-local storage and refactored the data model to store hashes as raw byte arrays.
- Compiler Optimizations: Enabled Dynamic Profile-Guided Optimization (PGO) to optimize hot loops based on runtime execution data.
- Throughput: Switched worker threads to synchronous I/O and hashing to remove Async State Machine overhead for high-speed NVMe drives.
- Lightweight Tracking: Replaced string-based status tracking with a lightweight
ItemStatusbyte enum.
Architecture & Refactoring
- Producer/Consumer Pattern: Replaced the hashing engine with
System.Threading.Channelsto decouple scanning from processing. - Lightweight Structs: Refactored pipeline to pass lightweight
FileJobstructs between threads instead of heap-allocated objects. - Code Organization: Split monolithic files into specialized partial classes/namespaces and centralized P/Invoke definitions into a
Win32Storageclass. - Thread Safety: Fixed critical race conditions by resolving list counts/progress limits on the UI thread and moved native code isolation to resolve compiler ambiguities.
- Build Configuration: Corrected build config to disable incompatible trimming flags while maintaining a lightweight single-file executable.
- Type Safety: Resolved all nullable reference warnings and compilation errors.
User Interface & Rendering
- Flicker Reduction: Replaced
LockWindowUpdatewithWM_SETREDRAWto eliminate artifacts during bulk updates. - Virtual Mode Optimization: Updated Virtual ListView to render directly from primitive arrays with cached hex string conversions to eliminate scroll lag.
- Resource Caching: Added GDI+ resource caching to the rendering pipeline to prevent system handle exhaustion.
- Update Throttling: Implemented modulo-based throttling (batches of 2,000) to reduce CPU cycles on system time checks and allow disk saturation without freezing the UI.
- Layout Improvements: Replaced "Pin-to-Top" with a scalable
SplitContainerand secondary ListView for large files; enabled horizontal scrolling for long paths; moved final time elapsed indicator to the top of the window. - Visual fixes: Fixed column resizing "Hard Stop" logic (0.75x–1.5x) to eliminate snap-back artifacts.
New Features & UX
- Duplicate Management: Integrated a "Show Duplicates" filter with conditional "Copy Duplicates" and "Delete Duplicates" batch script generation.
- Scripting Tools: Added "Delete BAD Files" script generator (auto-enabled on verification errors) and removed "Script Saved" message boxes for silent generation.
- View Options: Added a "View" menu to toggle columns/lock ordering and a "Show Full File Paths" option with dynamic width adjustment.
- Workflow: Updated save dialogs to default to the scanned root directory and added multi-colored status statistics with a debounced search filter.
Performance Benchmarks
Comparison between Previous Version (v2.30) and Current Version (v2.40).
| Metric | Previous Version | Current Version | Improvement |
|---|---|---|---|
| Memory Usage (Peak) | 2516 MB |
395 MB |
-84% |
| Scan Time (500k Files) | 02m 01s |
01m 15s |
1.61x Faster |
Test Environment: SATA SSD, 8 core CPU