Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json Schema Slow and Throwing error with intellisense and validation #211341

Open
MuhammedKalkan opened this issue Apr 25, 2024 · 5 comments
Open
Assignees

Comments

@MuhammedKalkan
Copy link

MuhammedKalkan commented Apr 25, 2024

Monaco Editor Playground Link

https://t.ly/RFBVh

Reproduction Steps

We are trying to use intellisense and validation with our schema in VSCode. However, after a few nested json children, intellisense and validation slows down leading to high CPU usage and then no suggestion in VSCode editor when schema is added in settings for json files.

Like:

"json.schemas": [ { "fileMatch": [ "*.json" ], "url": "file:/../schema.json" } ]

Also, monca editor is giving the error shown as below, added for more context

Add this schema and try to create a nested json

schema.json

image

Actual (Problematic) Behavior

Intellisense is slowing down and not recommending anymore

Animation

Expected Behavior

It should behave always the same, as fast as the initial code sensing and validation

Additional Context

We are using the intellisense and json validation for our users to create a correct json file

@aeschli
Copy link
Contributor

aeschli commented Apr 25, 2024

You have a recursive schema that goes across resources. The current code can not handle that and I don't think we will look at that any time soon.
If that's an option for you, I recommend you to move all in one file.

@MuhammedKalkan
Copy link
Author

MuhammedKalkan commented Apr 25, 2024

Using definitions in a single file and referring to them in the same file can' t be also handled because attached json file is in that structure

Note: Edited link in the first post to avoid confusion. In schema, it is all in one file

@aeschli
Copy link
Contributor

aeschli commented Apr 25, 2024

But now, with the updated schema (all in one file) thing seem to work:
image

What's not working for you?

@MuhammedKalkan
Copy link
Author

As the children increase it gets slower. And when trying to type 4th nested children it crashes with the callstack error

@aeschli
Copy link
Contributor

aeschli commented Apr 25, 2024

Ah I see, I take it back, I see the same problem....

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

No branches or pull requests

2 participants