v3.0.0
🚀 iPhoto v3.00 — Performance Overhaul / 性能重构
⚡ Migration to SQLite with global database architecture, optimized for TB-level libraries, and rock-solid stability.
We are thrilled to announce iPhoto v3.00! 🛠️
This major update focuses entirely on performance and stability. Based on user feedback regarding freezing issues with massive (TB-level) albums, we have completely rewritten the backend storage engine with a revolutionary global database architecture.
🌟 Key Updates in v3.00
⚡ Backend Migration to SQLite with Global Database Architecture
Addressed user feedback: "freezing on TB-level large albums"
- Complete Backend Rewrite: We have migrated from JSON-based indexing to a SQLite-powered global database.
- Single Database Design: All metadata across your entire library is stored in one centralized, high-performance SQLite database at the library root.
- Massive Scalability: Effortlessly handle TB-level photo libraries with hundreds of thousands of files without UI freezing or lag.
- Instant Response: Querying, sorting, and filtering are now instantaneous, regardless of library size.
- Smart Indexing: Multi-column indexes on
parent_album_path,ts(timestamp),media_type, andis_favoriteenable lightning-fast queries.
🏗️ Modular Architecture Refactoring
- Separation of Concerns: The 1100+ line monolithic index store has been split into 5 focused modules:
engine.py— Database connection and transaction managementmigrations.py— Schema evolution and version managementrecovery.py— Automatic database repair and salvagequeries.py— Parameterized SQL constructionrepository.py— High-level CRUD API
- 100% Backward Compatible: All existing code continues to work without modification.
- Enhanced Testing: Comprehensive unit tests for all new components with full test coverage.
🛡️ Enhanced Robustness & Efficiency
- Reduced Resource Usage: RAM and CPU footprint has been drastically reduced thanks to efficient SQLite queries.
- Rock-Solid Stability: Significantly lower crash rates and improved error handling ensure a smooth experience even under heavy load.
- Automatic Recovery: Built-in database recovery system with graded repair strategies (REINDEX → Salvage → Reset).
- WAL Mode: Write-Ahead Logging enabled for better concurrency and crash recovery.
💾 Unified Global Cache System
- Disk Space Saver: Single global database replaces scattered
.iphoto/index.jsonlfiles across all albums. - No Redundancy: Drastically reduces disk space occupation and eliminates duplicate index files.
- Centralized Management: All thumbnail metadata stored in one location for easier backup and sync.
🆚 The "Scan Once" Advantage
Better than Windows Explorer:
Windows Explorer often struggles with large folders containing thousands of images:
- 🐢 Slow folder switching.
- 🐢 Thumbnails load one by one, every time.
- 🐢 High memory usage triggers frequent re-rendering of thumbnails.
iPhoto v3.00 Experience:
- ⚡ Scan Once, Benefit Forever: After the initial scan, everything is solidified in the global SQLite database.
- ⚡ Instant Switching: Switch between massive folders instantly thanks to indexed queries.
- ⚡ Zero Load Time: Thumbnails appear immediately. No waiting, no white squares.
- ⚡ Smart Caching: Global database enables efficient cross-album queries and deduplication.
Once scanned, your library is always ready. iPhoto delivers a "browse at the speed of thought" experience powered by enterprise-grade SQLite.
🔧 Technical Highlights
Global Database Architecture
LibraryRoot/
.iphoto/
global_index.db # Single SQLite database for entire library
thumbs/ # Unified thumbnail cache
Album1/
.iphoto.album.json # Album-specific manifest (cover, favorites, etc.)
photo.jpg
Album2/
.iphoto.album.json
video.mp4
Key Benefits:
- Single Source of Truth: All asset metadata centralized in one database
- Fast Queries: Multi-column indexes enable instant filtering and sorting
- Efficient Storage: No duplicate index files across albums
- Easy Backup: One database file to back up all metadata
Query Performance
- Indexed columns:
parent_album_path,ts,media_type,is_favorite - Parameterized queries prevent SQL injection
- Cursor-based pagination for smooth scrolling
- Album filtering with wildcard support (e.g.,
2023/%)
Data Integrity
- WAL (Write-Ahead Logging) mode for crash safety
- Automatic recovery with graded repair strategies
- Data salvage from corrupted databases
- Idempotent write operations (duplicate scans produce same results)
🇨🇳 iPhoto v3.00 — 性能重构
⚡ 后端迁移至 SQLite 全局数据库架构,专为 TB 级超大图库优化,坚如磐石的稳定性。
我们非常激动地宣布 iPhoto v3.00 正式发布!🛠️
本次更新专注于 性能与稳定性。针对用户反馈的"管理 TB 级别超大相册时容易卡死"的问题,我们彻底重写了后端存储引擎,采用革命性的全局数据库架构。
🌟 v3.00 主要更新
⚡ 后端迁移到 SQLite 全局数据库架构
回应用户反馈:解决超大图库卡顿问题
- 后端彻底重写: 从基于 JSON 的索引迁移到 SQLite 驱动的全局数据库。
- 单一数据库设计: 整个图库的所有元数据存储在图库根目录的一个集中式高性能 SQLite 数据库中。
- 海量吞吐: 轻松管理 TB 级别的超大相册,即使包含数十万张照片,界面依然流畅丝滑,彻底告别卡死。
- 即时响应: 无论图库多大,查询、排序和筛选操作都能瞬间完成。
- 智能索引: 对
parent_album_path、ts(时间戳)、media_type和is_favorite进行多列索引,实现闪电般的查询速度。
🏗️ 模块化架构重构
- 关注点分离: 将 1100+ 行的单体索引存储拆分为 5 个专注的模块:
engine.py— 数据库连接和事务管理migrations.py— 模式演进和版本管理recovery.py— 自动数据库修复和抢救queries.py— 参数化 SQL 构建repository.py— 高级 CRUD API
- 100% 向后兼容: 所有现有代码无需修改即可继续工作。
- 增强测试: 为所有新组件提供全面的单元测试和完整的测试覆盖率。
🛡️ 资源占用大幅缩小,提升鲁棒性
- 轻量化运行: 得益于高效的 SQLite 查询,大幅降低了软件运行时的内存和 CPU 占用。
- 更稳定: 大幅降低了软件崩溃概率,显著提高了系统的鲁棒性,确保在长时间运行和高负载下的稳定性。
- 自动恢复: 内置数据库恢复系统,采用分级修复策略(REINDEX → 抢救 → 重置)。
- WAL 模式: 启用预写式日志以提高并发性和崩溃恢复能力。
💾 统一的全局缓存系统
- 节省磁盘空间: 单一全局数据库取代了分散在所有相册中的
.iphoto/index.jsonl文件。 - 告别冗余: 大幅降低了磁盘占用空间,消除了重复的索引文件。
- 集中管理: 所有缩略图元数据存储在一个位置,便于备份和同步。
🆚 "一次扫描,终生受益"
体验大幅领先 Windows Explorer:
Windows Explorer(资源管理器)在面对包含数千张图片的大文件夹时往往力不从心:
- 🐢 文件夹切换缓慢。
- 🐢 缩略图加载缓慢,每次打开都要重新读条。
- 🐢 全内存逻辑容易导致缓存被清除,频繁触发重新渲染。
iPhoto v3.00 的体验:
- ⚡ 固化扫描成果: 经过扫描固化后,所有索引和缩略图都会持久化到全局 SQLite 数据库中。
- ⚡ 秒切秒加载: 无论文件夹多大,得益于索引查询,切换瞬间完成,所有图库内容秒开。
- ⚡ 拒绝等待: 彻底解决了资源管理器反复加载的痛点,提供流畅的浏览体验。
- ⚡ 智能缓存: 全局数据库支持高效的跨相册查询和去重。
一次扫描,终生受益。iPhoto 让您的超大图库浏览体验如丝般顺滑,由企业级 SQLite 驱动。
🔧 技术亮点
全局数据库架构
图库根目录/
.iphoto/
global_index.db # 整个图库的单一 SQLite 数据库
thumbs/ # 统一缩略图缓存
相册1/
.iphoto.album.json # 相册特定的清单(封面、收藏等)
photo.jpg
相册2/
.iphoto.album.json
video.mp4
主要优势:
- 单一真实来源: 所有资产元数据集中在一个数据库中
- 快速查询: 多列索引支持即时筛选和排序
- 高效存储: 相册间无重复索引文件
- 易于备份: 一个数据库文件即可备份所有元数据
查询性能
- 索引列:
parent_album_path、ts、media_type、is_favorite - 参数化查询防止 SQL 注入
- 基于游标的分页实现流畅滚动
- 支持通配符的相册筛选(例如
2023/%)
数据完整性
- WAL(预写式日志)模式确保崩溃安全
- 分级修复策略的自动恢复
- 从损坏数据库中抢救数据
- 幂等写入操作(重复扫描产生相同结果)