Repository navigation
Reuse authorized page-review results within profile reads - #252
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 page-review reads currently evaluate the same authorization-heavy eligible set twice per lane, once for complete counts and again for bounded display rows. Materialize that set once within a single SQL statement and reuse it for both projections. Counts still cover all eligible rows before limits; source authority, active/terminal ordering, truncation and the primary repeatable-read contract remain intact. No authorization result survives the statement.
Also uses portable AbortSignal cancellation checks in the shared client, preserving
AbortErrorwhen React Native signals lackthrowIfAbortedorreason.Validation: 20 PostgreSQL integration checks covering page review, profiles and maintained-page API; 27 focused client/profile/live-dispatch checks; shared client build, backend types/build and scoped formatting. Two alternating local benchmark passes at 0/48/240 seeded runs produced identical complete outputs. Function-body queries fell 26→24 per full profile read (9→8 per page-review call). In the second pass, full-profile median at 240 runs was 104.62→78.77ms; this is an isolated fixture result, not a production latency claim. The database container was restored to its prior stopped state. Hosted CI is not awaited at the owner’s request; production verification follows the authorized update.bat rollout.