[v8-users] Re: store v8::Local in std containers like vector, unordered_map

2017-11-28 Thread Zac Hansen
You'll want to put it in a global, not a local. Globals outlive their lexical scope. Just as a note, they're move-only. On Tuesday, November 28, 2017 at 12:20:00 AM UTC-8, dark...@gmail.com wrote: > > I have code like: > > > v8::Isolate::Scope isolate_scope(isolate); > v8::HandleScope

[v8-users] Re: GC cost of adding to an object with 50,000+ keys

2017-11-28 Thread Camillo Bruni
As usual with V8 this is quite tricky to make a global statement. There are several forces at play here: 1. Normal objects have hidden classes, maintaining them is a an additional cost per new property 2. All property names for objects have to be internalized and get added to the global

[v8-users] Re: v8 map performance

2017-11-28 Thread dark . 0x5a
i need read only access to map from JS. -- -- 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

[v8-users] v8 map performance

2017-11-28 Thread dark . 0x5a
Hi. I have big unordered_map in C++, like std::unordered_map; It contains more than *10 million* elements, and i need about *10 thousand* hits to map from js. What is the most productive way to pass it to JS? *1)* I can add each item to v8 variable: v8::Local map;

[v8-users] Re: I can't fetch v8 because of error "Error: Command 'download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-clang-format -s v8/buildtools/linux64/clang-for

2017-11-28 Thread rezaelectronicss
I also should mention I use an ARM-based board(Nanopi-M1) that has Armbian 5.30(Ubuntu-server 16.04) on it(arm7-sun8i). -- -- 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] I can't fetch v8 because of error "Error: Command 'download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-clang-format -s v8/buildtools/linux64/clang-format.

2017-11-28 Thread rezaelectronicss
When I try "fetch v8" I get: Running: gclient root Running: gclient config --spec 'solutions = [ { "url": "https://chromium.googlesource.com/v8/v8.git;, "managed": False, "name": "v8", "deps_file": "DEPS", "custom_deps": {}, }, ] ' Running: gclient sync --with_branch_heads

[v8-users] store v8::Local in std containers like vector, unordered_map

2017-11-28 Thread dark . 0x5a
I have code like: v8::Isolate::Scope isolate_scope(isolate); v8::HandleScope handle_scope(isolate); v8::Local context = v8::Context::New(isolate); v8::Context::Scope context_scope(isolate); { std::vector ret = some_func(); some_another_func(ret); } Is this code valid if