LibreChat/packages
Marco Beretta 43cf2b91d7
perf(import): make tree repair linear and drop the shifting BFS queue
breakCycles allocated a Set per message and re-walked the whole ancestor
chain, measuring 1.06s for a single 5,000-message conversation and 5.1s at
10,000 - sizes a long real thread reaches. Colouring each node once makes it
linear, and it now roots the message that actually closes the loop instead
of whichever one the outer iteration started from, so a descendant of a
cycle keeps its parent.

enforceOrdering walked its queue with shift(), which re-indexes the whole
remaining array each step and turns a single BFS quadratic on a wide tree.
Conversion is synchronous, so that stalls unrelated requests.
2026-08-02 02:02:44 +02:00
..
api perf(import): make tree repair linear and drop the shifting BFS queue 2026-08-02 02:02:44 +02:00
client 🌀 ci: Deterministic Circular Dependency Checks (#14579) 2026-08-01 14:43:26 -04:00
data-provider feat(import): convert Grok exports with branches and per-message models 2026-08-02 02:02:43 +02:00
data-schemas fix(import): use partial index for importedFrom, not sparse 2026-08-02 02:01:57 +02:00