Skip to content

v1.1.3 - Redundant-fetch performance pass, round 3

Choose a tag to compare

@FranprzDev FranprzDev released this 10 Nov 12:47
· 30 commits to main since this release
c46d29f

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/quote and 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_section and list_change_requests loaded 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 optional analyze enqueue 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.