SquirrelDisk is built for speed. By leveraging Rust for the backend and parallel disk scanning, it can analyze large drives in seconds.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/adileo/squirreldisk/llms.txt
Use this file to discover all available pages before exploring further.
Rust Backend
SquirrelDisk’s backend is written in Rust, providing:- Memory safety without garbage collection
- Zero-cost abstractions for high performance
- Native compilation to machine code
- Minimal runtime overhead
Rust’s performance characteristics make it ideal for I/O-intensive operations like disk scanning, where efficient memory management is critical.
parallel-disk-usage Library
SquirrelDisk uses theparallel-disk-usage library for efficient disk scanning:
- Parallel directory traversal
- Progress reporting
- Error handling
- JSON output format
- Configurable scan depth and filtering
Sidecar Binary
The scanning is performed by a sidecar binary (pdu) that runs independently:
tauri.conf.json:
How Multithreading Works
Theparallel-disk-usage library uses a work-stealing algorithm to efficiently distribute directory scanning across CPU cores:
- Initial queue: Top-level directories are added to a work queue
- Thread pool: Multiple threads pull from the queue
- Work stealing: Idle threads steal work from busy threads
- Result aggregation: Results are collected and merged
Scan Arguments
--json-output: Returns results as JSON for easy parsing--progress: Emits progress updates during scanning--min-ratio: Filters out small items (default: 0.001 = 0.1%)
The
--min-ratio parameter prunes small files during scanning, significantly improving performance on directories with thousands of tiny files.Progress Reporting
SquirrelDisk provides real-time progress updates during scanning:Progress is calculated as (bytes scanned / total disk usage) × 100, capped at the total used space to handle filesystem edge cases.
Typical Scan Times
Scan times depend on several factors:- Disk size: Larger disks take longer
- File count: More files = more I/O operations
- Disk type: SSDs are much faster than HDDs
- CPU cores: More cores = better parallelization
- Filesystem: Some filesystems are faster to traverse
Example Benchmarks
| Disk Size | File Count | Disk Type | Scan Time |
|---|---|---|---|
| 256 GB | 100K files | SSD | 5-10 sec |
| 512 GB | 500K files | SSD | 15-30 sec |
| 1 TB | 1M files | SSD | 30-60 sec |
| 1 TB | 1M files | HDD | 2-5 min |
| 4 TB | 5M files | HDD | 10-20 min |
Memory Usage and Optimization
SquirrelDisk optimizes memory usage through several techniques:1. Streaming Scan Results
Results are processed as they arrive rather than waiting for the complete scan:2. Min-Ratio Filtering
Small files are filtered during scanning, not after:- Full Scan: 0.001 (0.1% of parent directory)
- Quick Scan: Configurable up to 1% for faster results
3. Tree Pruning
The scan output includes only significant files:4. Efficient Data Structures
The tree is stored as a hierarchy with references, not duplicated data:A typical 1TB disk with 1M files uses approximately 100-200MB of memory in SquirrelDisk, even though the raw file listing would be much larger.
Handling Large Directory Trees
SquirrelDisk gracefully handles large directory structures:Depth Limiting
The visualization only shows 3 levels at a time:Path Filtering
System paths are automatically excluded on Linux/macOS:Cancellable Scans
Scans can be cancelled at any time:Platform-Specific Optimizations
Windows
Handles backslash path separators:macOS
Uses native file APIs through Cocoa bindings for optimal performance.Linux
Leverages efficient filesystem traversal with proper error handling for permission issues.Best Practices
- Start with Quick Scan: Use the quick scan mode first to get a fast overview
- Drill down: Use Full Scan only on specific directories of interest
- Close other apps: Disk scanning is I/O intensive - close other disk-heavy applications
- SSD recommended: SSDs provide dramatically faster scan times
- Regular cleanup: Run SquirrelDisk periodically to keep your disk optimized
The combination of Rust’s performance, parallel scanning, and smart filtering makes SquirrelDisk one of the fastest disk analysis tools available.

