Repository navigation
Fix #42839. avoid ui freeze when file is larger than heap size limit. - #43006
Conversation
| function resolveJSFlags() { | ||
| let jsFlags = []; | ||
| if (args['js-flags']) { | ||
| jsFlags.push(args['js-flag']); |
| '--inspect-brk-extensions': localize('inspect-brk-extensions', "Allow debugging and profiling of extensions with the extension host being paused after start. Check the developer tools for the connection uri."), | ||
| '--disable-gpu': localize('disableGPU', "Disable GPU hardware acceleration."), | ||
| '--upload-logs': localize('uploadLogs', "Uploads logs from current session to a secure endpoint."), | ||
| '--max_old_space_size': localize('maxOldSpaceSize', "Max size of the old space (in Mbytes).") |
There was a problem hiding this comment.
Peng Lyu (@rebornix) this is a very technical description that no user will understand, I would not expose the V8 flag to the user but rather introduce a new CLI argument like "--max-memory", or possibly "--support-large-files"
|
Interesting, I didn't know about this limit built into v8 except for us using it in our gulp scripts. Why should this be a command line flag exposed to the user? IMHO users would prefer large files to just work, and not have to read about the command line flag. IMHO we should simply set the value of the flag to a large number. I would suggest we also ask on the v8 mailing list why is that built-in default value so low, and what precisely are the consequences of raising it. |
1c2bd7f to
6729e2b
Compare
|
From v8 mailing list:
so we keep the default old_space_size_limit and change it when users open large files. The command line args will be named as |
We set the file size limit to 300MB (on 32bit) and 16GB (on 64bit) based memory optimization and analysis in #30180 . As described in #42839, v8 heap size limit is making this limit smaller on 64bit. In this PR, we check
max_old_space_sizefirst and if it's exceeding v8's limit, we show error message to users and ask them to runcode --max_old_space_size={LARGERSIZE}to workaround.alexandrudima Can we remove the general file size limit, as we are moving to the new buffer and v8 is the limit ?
cc Benjamin Pasero (@bpasero)