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

[folding] make max folding region limit configurable #72994

Closed
Lovecircle opened this issue Apr 28, 2019 · 3 comments · Fixed by #140480
Closed

[folding] make max folding region limit configurable #72994

Lovecircle opened this issue Apr 28, 2019 · 3 comments · Fixed by #140480
Assignees
Labels
editor-folding Editor code folding issues feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@Lovecircle
Copy link

  • VSCode Version: 1.32.1
  • OS Version: Win7 x64

Steps to Reproduce:

  1. Set in editor settings:
    "editor.folding": true, "editor.foldingStrategy": "indentation"

  2. Open the attached file and go to line 43914 where folding stopped working.

test_ident.zip

  1. Delete couple of blocks of code - folding starts working again.

Developer of folding extension "Explicit Folding" pointed out to me that there is a hard limit of 5000 foldings per file. If it is so than I guess this is not a bug report but a feature request for editor setting in order to increase this limit. In my case, folding stopped working in file with about 35000 lines - which is not that many.

Does this issue occur when all extensions are disabled?: Yes

@vscodebot vscodebot bot added the editor-folding Editor code folding issues label Apr 28, 2019
@aeschli aeschli changed the title Indentation folding stops working in big file with many indentation. [folding] make max folding region limit configurable Apr 29, 2019
@aeschli aeschli added the feature-request Request for new features or functionality label Apr 29, 2019
@aeschli aeschli added this to the Backlog milestone Apr 29, 2019
@robcowart
Copy link

robcowart commented Feb 15, 2021

Is there any plan to address this? It is quickly becoming a show-stopper for us.

@gse4me
Copy link

gse4me commented Jul 15, 2021

Any news on this feature ?

@aeschli aeschli added the help wanted Issues identified as good community contribution opportunities label Jul 15, 2021
@zahanm
Copy link

zahanm commented Aug 14, 2021

I looked through, and these look like the relevant spots where this limit is currently hardcoded


const MAX_FOLDING_REGIONS = 5000;

const MAX_FOLDING_REGIONS_FOR_INDENT_LIMIT = 5000;

const newRegions = sanitizeRanges(rawFoldingRanges, 5000);

static readonly MAX_FOLDING_REGIONS = 5000;

Making it configurable, similar to editor.largeFileOptimizations seems preferable. Though it is of course a "shoot yourself in the foot" situation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-folding Editor code folding issues feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities insiders-released Patch has been released in VS Code Insiders verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@zahanm @aeschli @Lovecircle @rzhao271 @gse4me @robcowart and others