-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Test plan item for large files #30243
Comments
"50MB on 64-bit installations" (less than "300MB file size limit of 32-bit installations")? |
@Bill-Stewart There was previously a 50MB limit across all editors. That has changed to 300MB for Windows 32 bit and no limit for all other editors. |
Great job on that @alexandrudima! Even native Windows Notepad freezes and takes much longer to open large files than VS Code. Overall experience is good, although the limit for the file size on win32 seems to be optimistic in the current case. We crash quite gracefully, so for me it is acceptable. However, it would be good to have more parameters that define this limit. |
I've moved the text for the release notes to v1.15.md |
Test plan item for #30180:
fyi @egamma
Files will be considered large if they are above 30MB or above 300K lines. Such large files will never get tokenization, wrapping, indent guides, nor folding. Also, they will not travel to the extension host, nor to the web worker, so no diffing, quick diffing, link detection or word based suggestions. <-- parts of this is new
Otherwise, files that are larger than 5MB do not travel to the extension host, but otherwise use the regular file path (i.e. have tokenization, wrapping, etc. etc.) <-- this is not new.
Notes:
Release Notes contribution (someone needs to paste this in to 1.15.md which doesn't exist yet):
Large files are always a great way to stress-test an editor. We currently use a line based representation of the text buffer, which has some serious advantages, but also disadvantages, especially in terms of memory consumption (e.g. a file with very many short lines).
Any file that is over 30MB or over 300K lines will be considered a large file and handled in certain code paths, specially. By choosing to disable certain features for such files, e.g. tokenization, line guides, wrapping or folding, we were able to optimize the memory usage, in some cases, by as much as 50%.
Additionally, large files will never travel to our web worker, which computes diff information, link detection, or word based completions. This helps in reducing the memory pressure on the OS.
Some of the optimizations will impact all files, although the effects will be hard to notice with small files. We have decided to lift the hard coded file size limit of 50MB on 64-bit installations and enforce a 300MB file size limit of 32-bit installations.
Emergency toggles:
MAX_FILE_ZIE
USE_MIMINAL_MODEL_LINE
- uses a different implementation forModelLine
that does not have properties for all of the tokenization state and has a lazy markers property.USE_IDENTITY_LINES_COLLECTION
- uses a different implementation for the ViewModel line mapping that prohibits wrapping and folding from working and assumes a 1:1 mapping.AVOID_SLICED_STRINGS
- takes the strings that make up lines and runs them through a nodejs Buffer to avoid having a(sliced string)
per line.The text was updated successfully, but these errors were encountered: