AOSSIE-Org / AOSSIE-Org/PictoPy

Feat: Implement Incremental Indexing Engine for Scalable Library Management

未關閉
#1,186 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
283
分支
679
平均合併
7 天 2 小時
30 天內合併 PR
3

描述

## 🚀 Problem

Currently, library rescans may reprocess many or all images, even if they haven't changed.
For large libraries (10k+ images), this leads to:

- Slow refresh times
- Unnecessary ML reprocessing
- High CPU usage
- Poor scalability

There is no reliable mechanism to detect:
- Newly added files
- Modified files
- Deleted files
- Unchanged files

---

## 💡 Proposed Solution

Implement a true **Incremental Indexing Engine** that:

- Stores file metadata (e.g., path, size, last modified time, optional hash)
- Processes only new or modified files
- Skips unchanged files
- Removes deleted files from the database
- Cleans associated embeddings and thumbnails

---

## 🎯 Expected Benefits

- Significant performance improvement for large libraries
- Reduced redundant ML inference
- Better database consistency
- Production-grade scalability

---

## 🛠️ Implementation Overview

1. Extend image table schema to store file metadata
2. Add comparison logic during rescans
3. Update indexing pipeline to process only changed files
4. Handle cleanup for deleted files

---

## 🧪 Acceptance Criteria

- Only new/modified files are processed during rescan
- Deleted files are removed from DB
- No redundant ML processing occurs
- Works reliably on large datasets (10k+ images)

---

## 🙋 I would like to work on this issue.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。