refactor(server): Resolve bottlenecks and duplications

- Removed heavy Tantivy index rebuild loop that ran every 5 seconds and rewrote entire graph to disk
- Converted polling worker to lightweight IndexWriter committer
- Fixed 67+ instances of unnecessary clone and string parsing overhead in tool return results
- Deduplicated state graph modification methods
This commit is contained in:
Riz Ashraf committed 2026-09-19 07:48:51 +01:00
1 parent 4fe6ed7791
commit 2a25f17a32
3 files changed
+86 -108

No files matched your search

+1 -5
View File
@@ -52,11 +52,7 @@ impl MemoryState {
self.graph.read()
}
pub fn write_to_local_delta<F: FnOnce(&mut KnowledgeGraph)>(&self, update_fn: F) {
self.graph.modify(update_fn);
}
pub fn apply_sync_write<F: FnOnce(&mut KnowledgeGraph)>(&self, update_fn: F) {
pub fn modify_graph<F: FnOnce(&mut KnowledgeGraph)>(&self, update_fn: F) {
self.graph.modify(update_fn);
}