Repository navigation
perf(issues): read only the selected project tracker binding - #40587
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…gression Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceMeasured real Linux servers through authenticated HTTP/WebSocket RPC with synthetic GitHub HTTP responses. Each workload used fresh state: create the selected GitHub project, bind N unrelated ids, read detail and two older comments, then run 30 warmups and 300 measured detail reads. Three repetitions per commit.
At 500 bindings, the binding-resolution improvement was 1.812 ms versus run-median spreads of 1.090 ms before and 0.177 ms after. At 2,500, improvement was 10.564 ms versus spreads of 5.539 ms and 0.230 ms. The 2,500-binding RPC improvement was 12.919 ms, exceeding the larger run spread of 11.047 ms. All 7,200 measured details matched after normalizing projectId. Every run returned two older comments and made exactly 331 provider detail requests for 331 reads, with one comments request and no unexpected requests. Traces show the full-table binding SELECT before and WHERE project_id = ? after. Driver script · Reproduction bundle · Raw measurements Not shown:
|

Problem
Opening a GitHub issue or loading another comments page reads and decodes every project’s standalone tracker binding. The SQLite and schema work grows with the number of unrelated project bindings, including their additional team scopes.
Change
Why it happens. The issue service already selects one project when resolving a detail or comment request. Its binding repository still runs the workspace-wide query.
What changed. Pass the selected project ID down to SQLite and use the existing primary key. Workspace-wide issue listings and tracker settings still use a single full snapshot. Reads stay fresh on every operation.
Scope
Server-side issue binding lookups for web, desktop, mobile, and MCP. The query uses the existing schema. A malformed row still fails when the selected project owns it or a workspace-wide read includes it. A malformed row for an unrelated project no longer blocks a valid selected read.
Verification
Compared committed server code on an in-memory SQLite database with the production migrations and a controlled GitHub detail reply. Each arm ran 300 measured detail reads per workload. The exact detail results and provider attempt counts matched, including a failed read and retry. The fixture also checked an edited binding, a missing project, and a workspace listing.
At 500 bindings, unbound p95 fell from 2.433 ms to 0.136 ms. One empty-table candidate process had a noisy tail. Both empty-table runs stayed within 0.1 ms of main at the median. The timed endpoint was the issue service result. GitHub network latency and browser paint were outside the measurement.
GPT-6.2 Sol via Codex.