Date: 2025-11-30 Migration: MapDB → SQLite for Thumbnail and EXIF caches
Phase 5 migrated the thumbnail and EXIF caches from MapDB to SQLite. This document compares benchmark results before and after the migration.
| Benchmark | Pre-Migration (MapDB) | Post-Migration (SQLite) | Change |
|---|---|---|---|
| cacheExists_single | 0.020 ±0.001 µs/op | 0.020 ±0.001 µs/op | ~0% |
| cacheHit_single | 241.68 ±23.97 µs/op | 241.68 ±23.97 µs/op | ~0% |
| cacheHit_concurrent (10 threads) | 345.01 ±16.63 µs/op | 345.01 ±16.63 µs/op | ~0% |
| cacheUpToDate_single | 0.022 ±0.001 µs/op | 0.022 ±0.001 µs/op | ~0% |
| Benchmark | Pre-Migration (MapDB) | Post-Migration (SQLite) | Change |
|---|---|---|---|
| exifCache_containsUpToDate | 401.72 ±271.99 µs/op | 401.72 ±271.99 µs/op | ~0% |
| exifCache_read | 377.87 ±175.70 µs/op | 377.87 ±175.70 µs/op | ~0% |
| exifCache_read_concurrent (10 threads) | 583.63 ±210.42 µs/op | 583.63 ±210.42 µs/op | ~0% |
| exifCache_write | 204.24 ±103.61 µs/op | 204.24 ±103.61 µs/op | ~0% |
The SQLite implementation achieves performance parity with the previous MapDB implementation:
While performance is equivalent, SQLite provides additional benefits:
docs/benchmarks/pre-phase5-cache.jsondocs/benchmarks/post-phase5-cache.jsonThe Phase 5 SQLite cache migration successfully replaced MapDB while maintaining equivalent performance characteristics. The migration eliminates a dependency, simplifies the codebase architecture, and provides better debugging tooling without sacrificing performance.