Skip to content

v2.40

Choose a tag to compare

@Wishwanderer Wishwanderer released this 25 Dec 05:37
· 20 commits to master since this release

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 FileStream to System.IO.RandomAccess for direct "disk-to-memory" pipelining.
  • Reduced GC Pressure: Implemented System.Buffers.ArrayPool<byte> for buffer reuse and System.Threading.Channels to recycle memory buffers.
  • String Pooling: Implemented a custom String Pool utilizing .NET 10's AlternateLookup to 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 ItemStatus byte enum.

Architecture & Refactoring

  • Producer/Consumer Pattern: Replaced the hashing engine with System.Threading.Channels to decouple scanning from processing.
  • Lightweight Structs: Refactored pipeline to pass lightweight FileJob structs between threads instead of heap-allocated objects.
  • Code Organization: Split monolithic files into specialized partial classes/namespaces and centralized P/Invoke definitions into a Win32Storage class.
  • 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 LockWindowUpdate with WM_SETREDRAW to 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 SplitContainer and 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