microsoft / microsoft/vscode-json-languageservice
Performance with recursion
@aeschli is already working on this.
Since Oct 25, 2021.
- Dominant language
- TypeScript
- Stars
- 326
- Forks
- 145
- Avg merge
- 22h 10m
- Merged PRs (30d)
- 9
Description
When the schema reuse recursively 2-3 level, there is a big performance issue.
The vscode json service just freeze for 20+ seconds to parse the data. Normally it is < 2 seconds.
Here is a repro:
https://github.com/justland/just-func/blob/json-perf/json-schema-specs/draft-07-core/let.jsonc
The data causing problem is this one:
[
"str",
"Hello ",
[
"if",
[
"===",
"male",
[
"ret",
"gender"
]
],
"Mr. ",
"Mrs "
],
[
"ret",
"name"
]
]
At the deepest (===) it is 4 level dep using the same schema.
You can find the json schema here:
https://github.com/justland/just-func/blob/json-perf/json-schema-specs/draft-07-core-specs.jsonc
which references this schema:
https://github.com/justland/just-func/blob/json-perf/json-schema/just-func.jsonc
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.