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

code folding breaks on large (ish) files #89094

Closed
genghis-bunny opened this issue Jan 22, 2020 · 2 comments
Closed

code folding breaks on large (ish) files #89094

genghis-bunny opened this issue Jan 22, 2020 · 2 comments
Assignees

Comments

@genghis-bunny
Copy link

  • VSCode Version: insiders 1.42.0
  • OS Version: Windows 10

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

We are writing a vscode extension that makes heavy use of fluent interfaces/method chaining and often in large files.
Code folding is highly desirable for our use case but the out-of-the-box code folding in vscode can omit expected folds towards the end of the bigger files.

To illustrate the following code snippet has been repeated ad nauseam in a file with our custom file extension.

unfolded

When folded , all the lines up to 14983 and 14987 fold as expected but the lines 14995 and 14999 and after do not fold as expected.

folded

We have tried setting "editor.largeFileOptimizations": false (as per #34240) but this does not seem to improve the situation on our test using vscode (insiders 1.42.0) on a windows 10 machine. We have tried a "Folding Strategy" setting of "auto" and "indentation". We have not yet written a custom code folder for our extension because we do not know if the same effect will be seen after we implement it ("auto" for our language/file extension).

To reproduce a test file is available following and it is a *.txt file of approximately 15,000 lines and is 410.5 kb in size. The same effect is seen in files with *.txt extension as is in our custom file extension. The tested file size does not seem to be too excessive at 410.5 kb and the code folding is very responsive it just does not seem to precipitate the desired result towards the end of the file.

Steps to Reproduce:

  1. Cut and paste following into a text file

https://elasticbeanstalk-eu-west-1-828833189199.s3-eu-west-1.amazonaws.com/test.txt

  1. Execute command "Fold All" and compare lines 14983 and 14987 with lines 14995 and 14999

Many thanks in advance.

@aeschli
Copy link
Contributor

aeschli commented Jan 23, 2020

You are hitting the max limit of folding regions (added for performance reasons). Unfortunately it is hardcoded and not configurable. We have issue #72994 for that.

@aeschli aeschli closed this as completed Jan 23, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants