Fix UI freezes with large workspaces (#536)

This commit is contained in:
Gregory Schier
2026-08-14 10:15:32 -07:00
committed by GitHub
parent e032c4c8d6
commit d0af512a0c
20 changed files with 491 additions and 108 deletions
+9
View File
@@ -79,6 +79,15 @@ impl BlobContext {
Ok(chunks)
}
/// List all distinct body IDs in the blob database.
pub fn list_body_ids(&self) -> Result<Vec<String>> {
let mut stmt = self.conn.prepare("SELECT DISTINCT body_id FROM body_chunks")?;
let ids = stmt
.query_map([], |row| row.get(0))?
.collect::<std::result::Result<Vec<String>, _>>()?;
Ok(ids)
}
/// Delete all chunks for a body.
pub fn delete_chunks(&self, body_id: &str) -> Result<()> {
self.conn.execute("DELETE FROM body_chunks WHERE body_id = ?1", params![body_id])?;