Re: [v8-users] Function templates and object templates in custom start-up snapshot.

2015-06-06 Thread Jane Chen
Ben, The SetAccessor() idea was great. It helped cut the context creation time significantly. Thanks again! On Wednesday, June 3, 2015 at 4:06:39 AM UTC-7, Ben Noordhuis wrote: On Wed, Jun 3, 2015 at 7:11 AM, Jane Chen jxch...@gmail.com javascript: wrote: I have global variables and

Re: [v8-users] Function templates and object templates in custom start-up snapshot.

2015-06-05 Thread Jane Chen
Thanks Ben. I did cache my global template through a persistent handle which has a bunch of function templates and object templates set. The existence for the function templates is to support instanceof operator on our core value types (which you helped me with). I understand why creating

Re: [v8-users] Function templates and object templates in custom start-up snapshot.

2015-06-03 Thread Ben Noordhuis
On Wed, Jun 3, 2015 at 7:11 AM, Jane Chen jxche...@gmail.com wrote: I have global variables and global functions exposed through object templates and function templates, which slows down context creation. I wonder whether I could still leverage the custom snapshot feature to speed up context

Re: [v8-users] Function templates and object templates in custom start-up snapshot.

2015-06-03 Thread Jane Chen
Ben, My question is, say if I have a function Print with a native callback through function template and set it to the global template, use that to create a context, then use serializer to create a snapshot. If I use this snapshot to initialize v8, will function Print be pre-defined in that

[v8-users] Function templates and object templates in custom start-up snapshot.

2015-06-02 Thread Jane Chen
I have global variables and global functions exposed through object templates and function templates, which slows down context creation. I wonder whether I could still leverage the custom snapshot feature to speed up context creation with any of the following two approaches: 1) With the