Repository navigation
v1.1.3 - Redundant-fetch performance pass, round 3
Fourth performance pass over the MCP server and API. Four focused changes, each measured before and after on a disposable local Postgres 18 (numbers below are local microbenchmarks, not production latency):
- Quote reads reuse the owner lookup (#191):
GET /projects/:id/quoteand quote downloads fetched the project ownerId to choose the access path, then fetched the whole project again (brief + document versions + owner) inside the authorization helper. The helper now receives the row already loaded. 3.207 ms -> 1.837 ms, 3 -> 2 queries per call; the dropped query was the 4-table include. - Brief-only access for brief-only MCP tools (#192):
answer_question,update_scope_sectionandlist_change_requestsloaded the latest document version and the owner row but only read the brief. They now use the'brief'access mode from #187. 1.498 ms -> 0.697 ms per access check, 4 joined tables -> 2. - Document export version in one query (#193): the path behind every PDF/DOCX/MD export (including client-facing signed links) looked up the document and then its version in a second round trip; a single relation-filtered query returns the same row. 1.253 ms -> 0.955 ms, 2 -> 1 queries per export.
- No trailing refetch in add_client_input (#194): every call re-read the project just to return
agentStatus, which only the optionalanalyzeenqueue can change. The default path (analyze off) now answers from the already-loaded project. 2.701 ms -> 2.060 ms, 4 -> 3 queries per call.
Full methodology and per-change details are in each PR body.