fix merge conflicts

This commit is contained in:
Vidya Rupak 2025-12-23 02:33:30 -07:00
commit 3b504e1c9f
3 changed files with 17 additions and 2 deletions

View file

@ -80,4 +80,19 @@ NodeCache now cleans up deleted nodes properly
#### Race Condition Fix
Atomic node/edge updates eliminate NaN positions
#### Canvas Rendering Optimizations
Reduced per-frame overhead and improved rendering efficiency
- Spatial grid for hit detection
- Batched edge rendering by type (fewer canvas state changes)
- Canvas quality settings initialized once instead of every frame
- Optimized render key using fast hash instead of string concatenation
- Memoized nodeMap to avoid rebuilding every frame
#### Node Limiting & Memory Management
Smart memory limiting prevents performance issues with large datasets
- `maxNodes` prop limits total memory nodes (default: 500 in playground)
- Dynamic per-document cap distributes budget across documents
- Prioritizes recent memories and high-relevance scores
- k-NN similarity limit reduced from 15 to 10 connections per document
---

View file

@ -39,8 +39,8 @@ export const MemoryGraph = ({
selectedSpace: externalSelectedSpace,
onSpaceChange: externalOnSpaceChange,
memoryLimit,
isExperimental,
maxNodes,
isExperimental,
// Slideshow control
isSlideshowActive = false,
onSlideshowNodeChange,

View file

@ -62,7 +62,7 @@ export const LAYOUT_CONSTANTS = {
// Similarity calculation configuration
export const SIMILARITY_CONFIG = {
threshold: 0.725, // Minimum similarity (72.5%) to create edge
maxComparisonsPerDoc: 10, // k-NN: each doc compares with 15 neighbors (balanced performance)
maxComparisonsPerDoc: 10, // k-NN: each doc compares with 10 neighbors (optimized for performance)
}
// D3-Force simulation configuration