Repository navigation
Speed up the output plugin - #299
Merged
Merged
Conversation
The output plugin built the instance location's URI three times for every keyword, and building it encodes the pointer. Validating a 150KB GitHub workflow against its schema with JSE output went from about 44ms to 30ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Output records are keyed by instance locations, keyword URIs and schema locations, so nearly every key added to a plain object gave it a new hidden class. Records without a prototype start in dictionary mode instead. Validating a 150KB GitHub workflow against its schema with JSE output went from about 30ms to 26ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All of a schema's keywords apply to the same instance location, but its URI was built after every keyword. It's now built when the schema is entered. Validating a 150KB GitHub workflow against its schema with JSE output went from about 26ms to 22ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The output is only used when there are errors, but it was built during every evaluation. The plugin now records what each schema's keywords did and builds the normalized output from that when it's first asked for. Validating a valid 150KB GitHub workflow against its schema with JSE output went from about 21ms to 7ms. An invalid one went from about 23ms to 24ms because the output is built after evaluation instead of during it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Validating a valid 150KB GitHub workflow against its schema with JSE output went from about 44ms to 7ms. An invalid one now takes about 24ms.
🤖 Generated with Claude Code