Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ Optimized metric route processing to O(N) by creating a mapping of routes direct
## 2026-06-25 - Avoid Map allocations in frontend ERD loops and mutate asyncpg records in-place
**Learning:** The frontend `snapshotToGraph` iterates over thousands of columns to generate the graph, so repeated lookups and redundant collection assignments increase GC pressure. Backend snapshot column dictionaries are freshly instantiated for the payload, so `add_column_examples` can safely fill missing fields in place.
**Action:** Reuse existing collections while aggregating relational data, create `Map`/`Set` entries only on first use, and check for missing example fields before calling expensive inference helpers.

## 2024-05-24 - [Avoid Array Allocations in High-Frequency Search Filters]
**Learning:** In React component renders that filter large lists of complex objects (like ERD tables with many columns), using modern array methods like `.flatMap` combined with `.join` causes significant memory allocations and garbage collection overhead. This creates noticeable UI stuttering when the user types in a search box.
**Action:** When filtering across deeply nested structures inside render functions or `useMemo` hooks, prefer traditional `for` loops and simple string concatenation (e.g., `str += val`) to build the search corpus. This approach avoids allocating intermediate arrays, reducing both execution time and GC pressure.
Loading