Repository navigation
Reduce profile and chat loading overhead - #253
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Profile loading repeatedly rechecked the same retained source documents through both chat and job dependencies. Reuse distinct canonical source proofs within the existing statement snapshot, after checking job provenance and chat container access. Entry, turn and delivery checks still run, and each request reads current authority.
Chat lists omit search-only SQL for empty searches and take the existing retained-conversation eligibility path before legacy history checks. Displayed titles and individual entries retain their source checks. Recent signed-in requests also avoid a redundant session-touch query while still authenticating against the primary. The agent-facing
get_chatsread opts out of JIT only for its read-only transaction; the existing provenance fixture now passes instead of timing out during expanded permission-query compilation.Validation: focused PostgreSQL visibility, profile, chat, provenance and session tests; shared builds, backend build/types, formatting and source review. Complete ordered payloads matched in alternating comparisons, including revocation and cyclic retained sources. A bounded read-only production-data comparison reduced profile helper time from 0.90–1.04s to 0.55–0.60s; the rich retained-chat fixture improved from 2.32s to 1.60s. These samples are not p95 or full-page latency. No persistent permission cache, schema migration or global planning change is introduced.