v2.5.44 — Performance Efficiency Audit
Performance Efficiency Audit — 7 High-Impact Fixes
Backend
Database (journal.rs)
- Added index on
operations.reverted— undo/redo queries now use index instead of full table scan - Added
PRAGMA busy_timeout = 5000— graceful handling under contention
Watcher (watcher.rs)
- Consolidated double Mutex lock into single acquisition — 50% less lock contention on hot path
Rule Engine (rule_engine.rs)
- Changed regex cache from
MutextoRwLock— concurrent reads no longer serialized
Duplicates (duplicates.rs)
- Eliminated triple
fs::metadataper file — carry size/modified through pipeline (saves ~20K stat calls per 10K files)
Organizer (organizer.rs)
- Added extension check before metadata extraction — skip EXIF/audio parsing for non-media files (saves ~1800 file opens per 1000 mixed files)
Channel (lib.rs)
- Increased watcher channel capacity 100 → 1000 — prevents event loss during bulk file operations
Frontend
App.tsx — Conditional rendering
- Replaced
display: nonepattern with conditional rendering - Only the active panel is mounted — eliminates 6 unnecessary component trees at startup
- Stops LiveCapture 5s polling when panel inactive (~48 API calls/min saved)
- Stops ChangeTimeline 10s polling when panel inactive (~6 API calls/min saved)
Impact Summary
| Fix | Before | After |
|---|---|---|
| DB index on reverted | Full table scan | Index seek |
| Mutex contention | 2 locks per event | 1 lock per event |
| Regex cache reads | Serialized | Concurrent |
| Metadata reads per file | 3 stat() calls | 1 stat() call |
| Non-media metadata | Always extracted | Skipped |
| Channel capacity | 100 (event loss) | 1000 (no loss) |
| Panel mounting | All 7 always mounted | Only active panel |
Packages
AFO_2.5.44_amd64.deb— Debian/UbuntuAFO-2.5.44-1.x86_64.rpm— Fedora/RHEL