Hello,

I've been working on a project that adds properties to objects in a 
variable order as they come in over the network (hidden classes and similar 
optimizations can't be applied). I've noticed that V8, on both Chrome and 
Node, uses huge amounts of memory to represent them compared to other JS 
engines.  I'm testing on Windows.

In 64-bit V8, an object with 50 simple properties with integer values uses 
~6000 bytes of memory, which works out to >100 bytes overhead per entry. 
 32-bit is somewhat better at ~3000 bytes per object and >45 bytes overhead 
per entry, but it's still really bad.

In comparison, the same 50-property objects were only ~900 bytes each in 
Firefox and Edge.  That's 3-6X less!

I've included a test that shows the issue if you'd like to try it 
out: https://repl.it/HIMc/7.  Be sure to turn off infinite loop protection 
in settings.  After running it, you can force a gc and check the browser's 
memory usage (divide by 200000, that's the test # of objects).

Anyone else seen similar problems?  That seems like a crazy amount of 
overhead per property.

-Russ

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

Reply via email to