Skip to content

cache compiled schema and implement cache invalidation strategy#16

Open
srivastava-diya wants to merge 7 commits into
hyperjump-io:mainfrom
srivastava-diya:feature/schema-caching
Open

cache compiled schema and implement cache invalidation strategy#16
srivastava-diya wants to merge 7 commits into
hyperjump-io:mainfrom
srivastava-diya:feature/schema-caching

Conversation

@srivastava-diya

@srivastava-diya srivastava-diya commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Description

The validate(schemaUri) function is curried calling it with just the schema URI compiles the schema and returns a reusable validator function. Previously this compilation was happening on every keystroke.

@jdesrosiers jdesrosiers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to handle cache invalidation when a schema changes.

@srivastava-diya srivastava-diya force-pushed the feature/schema-caching branch from 0ad2b54 to 46a1d63 Compare June 15, 2026 01:09
@srivastava-diya srivastava-diya changed the title cache compiled schema validators and add id to fixtureSchemaUri in schemaValidation test cache compiled schema and implement cache invalidation strategy Jun 15, 2026
@srivastava-diya srivastava-diya force-pushed the feature/schema-caching branch from 006ca38 to 58f499e Compare June 17, 2026 21:03
schemaStore.clear(change.uri);
}

for (const document of documents.all()) {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am figuring out some way to find which open files reference the updated schema, until then i am looping through and revalidating all open documents.

@srivastava-diya

Copy link
Copy Markdown
Collaborator Author

hey @jdesrosiers This PR is still a WIP, so I'm not looking for approval just yet. I'd really appreciate a review to make sure if I'm proceeding in the right direction before I continue implementing the other stuff.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants