[v8-users] Frequent GC in nodejs app

2016-11-21 Thread Matthew Tejo
Hey, I've been working on a problem our web app has. Our response times are spiking. I tracked to this down being caused by marksweep gc. Response's can take up to 6 seconds. I enabled gc logs and and the scavenge seems to be happening very frequently but not getting rid of anything. New

[v8-users] Re: Per-isolate FunctionTemplate cache

2016-11-21 Thread tblodt
Here's what Jochen originally said: v8 has an per-isolate cache of function templates. As the string is > referenced by the function template, it will never go out of scope. > I'd recommend to create a weak handle to the function you create via > GetFunction() instead

Re: [v8-users] Per-isolate FunctionTemplate cache

2016-11-21 Thread Toon Verwaest
I don't know which cache you are talking about. Afaik there's only a "function-template-instantations-cache". That caches JSFunctions per native context resulting from instantiating a function template. On Mon, Nov 21, 2016 at 12:05 PM Ben Noordhuis wrote: > On Sun, Nov 20,

Re: [v8-users] Per-isolate FunctionTemplate cache

2016-11-21 Thread Ben Noordhuis
On Sun, Nov 20, 2016 at 11:09 PM, wrote: > Jochen Eisinger said that "v8 has an per-isolate cache of function > templates". I have a few questions about this cache: > > If I create multiple FunctionTemplates with different callback data but the > same callback function and

Re: [v8-users] Setting an execution limit

2016-11-21 Thread Jakob Kummerow
There is always a stack limit, which always prevents infinite recursion; as well as, in fact, finite but very deep recursion. As Ben said, the only way to prevent infinite or long-running loops is by interrupting the program from another thread. You may have heard of the *Halting Problem*, TL;DR: