mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-22 00:31:17 +00:00
* perf(mro): replace O(n³) C3 merge loop with O(n²) head-pointer algorithm The C3 linearization merge loop used Array.shift() (O(n) per call) and Array.indexOf() for tail membership checks (O(n) per scan), producing O(n³) total complexity across deep single-inheritance chains. A 2000-class chain took ~43s, exceeding the 15s test timeout. Replace with: - Uint32Array head pointers (O(1) advance, no array mutation) - Pre-computed tail-count Map (O(1) membership check, decremented on head advance) The deep-chain test now completes in ~2s. Closes #1309 * fix(mro): address review findings for C3 merge optimization - Add test for C3 merge-conflict inconsistency (non-cyclic): classic A(X,Y) + B(Y,X) → C(A,B) incompatible ordering, assert fallback to BFS ancestors - Clarify tailCount decrement comment to state the invariant explicitly - Move deep-chain performance test to dedicated describe('performance') block (was incorrectly nested under 'cyclic inheritance') |
||
|---|---|---|
| .. | ||
| augmentation | ||
| embeddings | ||
| graph | ||
| group | ||
| ingestion | ||
| lbug | ||
| platform | ||
| search | ||
| tree-sitter | ||
| wiki | ||
| embedding-mode.ts | ||
| git-staleness.ts | ||
| run-analyze.ts | ||