You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 776f1ea
Browse filesBrowse the repository at this point in the historyBrowse files
fix(server): turn starts in long threads no longer stall the server
Each turn start reads the thread's runtime recovery state four times.
Several of those reads look up unfinished turn items without a type
filter, so no partial index applied and SQLite read every item in the
thread. On threads with 14,000-17,500 items that cost 75-93 ms per read,
so each turn start blocked the event loop for roughly 300-370 ms,
freezing every client request, browser stream input included.
Add a partial index over unfinished turn items, ordered like the
recovery read, and drop a redundant run_id IS NOT NULL filter that
steered one subquery onto the full-history run index. The same reads
now take 4-7 ms on those threads.
0 commit comments