Skip to content

perf(raw): read the share and its raw row once per request - #235

Merged
ernolf merged 1 commit into
mainfrom
ernolf/perf/single-share-lookup
Dec 2, 2026
Merged

ernolf merged 1 commit into
mainfrom
ernolf/perf/single-share-lookup

Conversation

@ernolf

@ernolf ernolf commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Closes #231

  • PubPageController hands the id of the share it resolved to returnRawResponse(), and CspManager reads the per-share CSP with it instead of looking the token up again with getShareByToken(). CspManager no longer needs IManager.
  • RawShareRegistry keeps the result of getMeta() per share id for the rest of the request; enable(), disable() and purge() drop it, and every write to raw_shares goes through them.
  • A public raw request now reads the share once instead of twice and its raw_shares row at most once instead of three times.
  • The order of the CSP sources stays: a raw_csp token rule still comes before the per-share CSP, and a private request reads no share.

Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>
@ernolf ernolf self-assigned this Dec 2, 2026
@ernolf ernolf added enhancement New feature or request php Pull requests that update php code labels Dec 2, 2026
@ernolf
ernolf merged commit 55c3d78 into main Dec 2, 2026
53 checks passed
@ernolf

ernolf commented Dec 2, 2026

Copy link
Copy Markdown
Owner Author

/backport nach stable0.9

@github-actions
github-actions Bot deleted the ernolf/perf/single-share-lookup branch December 2, 2026 23:41
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

The command was not understood. It is /backport to <branch> on a line of its own, one line per branch.

@ernolf

ernolf commented Dec 2, 2026

Copy link
Copy Markdown
Owner Author

/backport to stable0.9

@ernolf

ernolf commented Dec 3, 2026

Copy link
Copy Markdown
Owner Author

/backport to stable0.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request php Pull requests that update php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Public raw requests look up the share twice and raw_shares three times

1 participant