refactor: apply rust best practices and fix memory optimizations
- Optimized memory allocation in router.rs by offloading JSON serialization to spawn_blocking and using references. - Prevented full graph duplication on startup in state.rs index rebuild. - Eliminated massive String allocations in QueryGraphPathHandler BFS loops. - Avoided temporary Strings in VisualizeGraphHandler via inline writing. - Fixed O(N) full-graph deduplication in MergeEntitiesHandler to scale efficiently.
This commit is contained in:
1 parent
251757f8fc
commit
37003be620
17 files changed
+399
-198
No files matched your search
@@ -196,5 +196,3 @@ pub struct GateRecord {
|
||||
pub reason: Option<String>,
|
||||
pub timestamp: u64,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user