Repository navigation
perf: Decode the schema argument only on a callsite cache miss - #104
Merged
Merged
Conversation
Contributor
|
@Stranger6667 I merged #106 first, can you please fix the merge conflicts? |
Signed-off-by: Dmitry Dygalo <dmitry@dygalo.dev>
Stranger6667
force-pushed
the
dd/schema-arg-raw
branch
from
September 30, 2026 11:28
e21e13b to
51ca5c3
Compare
imor
approved these changes
Sep 30, 2026
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.
What kind of change does this PR introduce?
Performance follow-up on compiled schemas
What is the current behavior?
The compiled-schema functions decode the
jsonschemaargument on every call, even when the callsite already holds its validator.What is the new behavior?
The callsite cache is keyed on the argument's stored bytes (for a large schema, a TOAST pointer). The schema is decoded only on a cache miss.
Additional context
With the FHIR schema (3.2 MB) over 10k rows: