Skip to content

perf(server): yield between filtered workspace search pages - #197

Merged
leoisadev1 merged 2 commits into
mainfrom
perf/workspace-search-yield
Sep 8, 2026
Merged

perf(server): yield between filtered workspace search pages#197
leoisadev1 merged 2 commits into
mainfrom
perf/workspace-search-yield

Conversation

@leoisadev1

Copy link
Copy Markdown
Member

Problem

Content searches can process many filtered native grep pages without yielding, delaying unrelated server work until the search budget expires.

Changes

Yield between subsequent grep pages and recheck the deadline before starting another native call. Keep the first-page behavior and search results unchanged. Add regressions for concurrent work, budget expiration during the yield, interruption, and finder cleanup.

Verification

  • Parent verification passed all 41 tests across WorkspaceSearchIndex and WorkspaceEntries, including real native index/search behavior in isolated temporary workspaces.
  • Targeted lint, focused TypeScript checking, and diff checks passed.
  • No client, provider adapter, contract, or migration changes. No browser UI behavior or end-to-end latency percentage is claimed; the scheduling and cancellation regressions use deterministic test controls.
  • Full repository and configured Effect compiler checks are left to CI.

Implemented and verified by gpt-6-astra in T3 Code through the Grok harness.

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
akeru-bot-landing Skipped Skipped Sep 8, 2026 7:32pm UTC

Request Review

@github-actions github-actions Bot added size:XS vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Sep 8, 2026
@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR improves filtered, paginated workspace content searches in WorkspaceSearchIndex.ts. It yields before requesting a subsequent native grep page, rechecks the search deadline after yielding, and adds coverage confirming that interrupted searches do not issue another native call and still release their finder.

Confidence Score: 5/5

Safe to merge; the changed paginated-search behavior is covered by focused execution checks.

No findings remain. The targeted before-and-after checks confirm that queued work runs before the next native grep page, an expired deadline prevents another native call, and interruption preserves cleanup.

Files Needing Attention: No files need additional attention. The focused changes in apps/server/src/workspace/WorkspaceSearchIndex.ts and apps/server/src/workspace/WorkspaceSearchIndex.test.ts were exercised.

T-Rex T-Rex Logs

What T-Rex did

  • Reviewed the paginated content-search loop with a focus on scheduling, deadline handling, interruption, and finder cleanup.
  • Compared the PR against the earlier implementation using three targeted checks; the older approach did not yield before the next grep and could begin another grep after the simulated deadline, while the PR passed all three checks.
  • Validated the PR validation output showing Tests 3 passed | 8 skipped (11).
  • Confirmed the before-and-after comparison script is retained and does not modify source files.
  • Captured and retained the exact validation script and its before/after outputs as artifacts for review.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

@leoisadev1
leoisadev1 merged commit 49f490a into main Sep 8, 2026
11 checks passed
@leoisadev1
leoisadev1 deleted the perf/workspace-search-yield branch September 8, 2026 19:51
@github-actions github-actions Bot mentioned this pull request Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant