Files
orca/config/scripts
Brennan Benson 36e1291aef perf(session-history): end a scan only when it stops making progress (#28434)
* perf(session-history): end a scan only when it stops making progress

A cold Session History scan of a large history was killed 130 seconds in
every time, however healthy it was, and every Refresh died at the same place.

The scanner child now reports progress for a running scan, at most once a
second and only when real work advanced: a directory listed, a batch of
files statted, a transcript chunk read, a candidate file parsed. Progress is
keyed to the scan's own cancel signal, so the search index or an
interactive read in the same child never extends it. The parent re-arms the
130 second window only for an active, uncancelled scan whose counter grew.

When a request deadline does fire, the child gets the shutdown frame and the
existing two-second grace to abort and save its parse cache before the kill.
Exit, disconnect, malformed-message and cancel-timeout faults still kill at
once. Startup, cancel and interactive bounds are unchanged.

* fix(session-history): keep the deadline module off child_process and let the orcad smoke skip progress frames
2026-10-13 17:17:56 -07:00
..
2026-05-15 05:44:25 -04:00