High-performance disk space analyzer for macOS
Features • Installation • Usage • Tech Stack • Development
- Treemap Visualization - Interactive squarified treemap showing file/folder sizes at a glance
- Blazing Fast Scanning - Parallel file system traversal using work-stealing algorithms (~70k files/sec)
- Smart Caching - Instant reload on subsequent visits with disk-based cache
- Hardlink Deduplication - Accurate size calculation that doesn't double-count hardlinked files
- Multiple Themes - 6 beautiful themes including Arctic Light, Midnight Dark, Cyberpunk, Ocean Deep, Forest, and Sunset
- File Type Filtering - Filter by documents, images, videos, audio, archives, code, and more
- Search - Quickly find files by name
- File Operations - Open files, reveal in Finder, or delete directly from the app
Tested on a MacBook Pro scanning ~/Desktop with 1.4M+ files:
| Metric | Value |
|---|---|
| Files scanned | 1,450,000+ |
| Scan speed | ~70,000 files/sec |
| Total scan time | ~40s (first scan) |
| Cached reload | Instant (<1s) |
| Memory usage | ~1.7 GB peak |
Download the latest release from the Releases page.
# Clone the repository
git clone https://github.com/majiayu000/spaceview.git
cd spaceview
# Install dependencies
pnpm install
# Run in development mode
pnpm tauri:dev
# Build for production
pnpm tauri build- Launch SpaceView
- Click "Open Folder" or press
Cmd+Oto select a directory - Wait for the scan to complete (progress is shown in real-time)
- Explore the treemap:
- Click on a folder to zoom in
- Right-click for context menu (Open, Reveal in Finder, Delete)
- Use the breadcrumb navigation to go back
- Use Filter to show only specific file types
- Use Search to find files by name
- Switch themes using the dropdown in the top-right corner
- Frontend: React 19 + TypeScript + Vite
- Backend: Rust + Tauri 2.0
- Styling: CSS Variables for theming
- Algorithms:
- Squarified Treemap layout
- Work-stealing parallel traversal (via
ignorecrate) - Lock-free concurrent data structures (
DashMap,DashSet) - Bottom-up directory size calculation
SpaceView/
├── src/ # React frontend
│ ├── App.tsx # Main application component
│ ├── Treemap.tsx # Treemap visualization
│ ├── ThemeSwitcher.tsx # Theme selection
│ └── themes.ts # Theme definitions
├── src-tauri/ # Rust backend
│ ├── src/
│ │ ├── lib.rs # Tauri commands
│ │ ├── scanner.rs # High-performance file scanner
│ │ └── cache.rs # Scan result caching
│ └── Cargo.toml
└── package.json
- Parallel Traversal: Uses
ignore::WalkParallelwith work-stealing for optimal CPU utilization - Lock-free Data Structures:
DashMapandDashSetfor concurrent access without mutex contention - Inode Tracking: Tracks
(device_id, inode)pairs to avoid counting hardlinks multiple times - Streaming Progress: Real-time progress updates via Tauri events
- Smart Tree Limits: Configurable
MAX_CHILDREN,MAX_DEPTH, andMAX_TOTAL_NODESto prevent memory issues - Binary Cache: Uses
bincodefor fast serialization/deserialization of scan results
MIT License - see LICENSE for details.
- Tauri - Build cross-platform desktop apps
- ignore - Fast directory traversal
- DashMap - Lock-free concurrent hashmap
- Inspired by SpaceSniffer and WinDirStat
