Re: [v8-users] Context creation overhead

2021-12-22 Thread Maik Riechert
I did some more experiments and it turns out that freezing all globals breaks quite a bit of code since the semantics for property assignment change. For example, the following pattern wouldn't work anymore if Error.prototype is frozen: function MyError(e) {} MyError.prototype = new Error

Re: [v8-users] Context creation overhead

2021-12-08 Thread Maik Riechert
I had another thought about re-using contexts. If there was a way to freeze the global object (make it and all its child objects read-only), would that be enough to guarantee a predictable state per request? I realize that this probably would break some libraries, but I'd like to explore it

Re: [v8-users] Context creation overhead

2021-11-29 Thread Jakob Kummerow
On Mon, Nov 29, 2021 at 5:07 PM Maik Riechert wrote: > Hi all, > > The CCF project (https://github.com/microsoft/CCF) is evaluating to use > V8 as JavaScript engine (currently QuickJS) for handling HTTP requests. > > One of the requirements we have is that each request should get a fresh >

[v8-users] Context creation overhead

2021-11-29 Thread Maik Riechert
Hi all, The CCF project (https://github.com/microsoft/CCF) is evaluating to use V8 as JavaScript engine (currently QuickJS) for handling HTTP requests. One of the requirements we have is that each request should get a fresh environment. In QuickJS, we simply create a new runtime for each