microsoft / microsoft/monaco-editor

[Bug] Folding not working for big json objects

Open
#4,566 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug confirmation-pending folding
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Reproducible in vscode.dev or in VS Code Desktop?
  • Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
Monaco Editor Playground Link

No response

Monaco Editor Playground Code

No response

Reproduction Steps

In an Angular project:

  1. Display a very big json file 200.000+ lines
  2. After all the data is loaded call this._instance.getAction('editor.foldLevel2').run();
  3. Every object starting from line 168840 isn't folded
Actual (Problematic) Behavior

Not all objects are folded correctly.

Expected Behavior

All objects should fold correctly despite the length of the file.

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in an Angular project with a 200,000+ line JSON file, then call this._instance.getAction('editor.foldLevel2').run(). Investigate why folding stops around line 168840; done means all JSON objects fold correctly despite the file length.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.