Hi v8 devs,
  I'm working on VSCode and looking into on large file (Gigabyte files) 
improvement. As VSCode is Electron based and currently we load the whole 
file into memory (we can do mmap), we easily run into heap size limit 
<https://github.com/v8/v8/blob/5918a23a3d571b9625e5cce246bdd5b46ff7cd8b/src/heap/heap.cc#L149>.
 
Based on what I learnt 
from http://erikcorry.blogspot.ru/2012/11/memory-management-flags-in-v8.html, 
we can set `js-flags=--max_old_space_size=` to increase the limit and users 
can do so themselves as Electron will pass the flags to v8.
  In order to provide better experience of opening large files (larger than 
the v8 default limit), I'm thinking about setting `max_old_space_size ` to 
a large one (for example 16GB, which a limit for our current text buffer 
implementation) but I'm wondering whether it will lead to any potential 
side effect, for instance

   1. Does v8 prefer to use more memory eagerly once we set 
   max_old_space_size to a high value, even when the objects in heap is 
   relatively small? Or maybe we don't need to worry about this until the 
   memory usage is near the size limit?
   2. Does this flag affect GC in a noticeable way?

  Most of the time our users are working on small files (KBs, MB files are 
rare) so we don't want to downshift their experience so I'd like to know 
the best practice of using `max_old_space_size`. Do you have any idea on 
this? Thanks in advance!

Thanks,
Peng

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to