Re: [nodejs] Re: Are functions which defined using eval or new Function() optimized?

2018-03-03 Thread Koray
This is very useful to know. Thank you for your help.

On 3/3/18, Zlatko  wrote:
>
> Hi Koray,
>
> Apparently, the answer to your original question is "yes", functions
> generated by "eval" or "new Function()" will get optimized. I've asked one
> of the V8 developers on Twitter, he even referred on how Webpack (pretty
> popular and well known JavaScript package) achieves crazy improvements on
> their latest iteration:
>
> https://mobile.twitter.com/bmeurer/status/969599687274745856
>
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/d7e7e0a7-f604-425d-a689-2f6cc2e44ec5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHW%3DSBHYy5JPEOaKj2jFBpzQy4MpD2MrU6gP1zjtsWhbCYVY5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[nodejs] Re: Are functions which defined using eval or new Function() optimized?

2018-03-03 Thread Zlatko

Hi Koray,

Apparently, the answer to your original question is "yes", functions 
generated by "eval" or "new Function()" will get optimized. I've asked one 
of the V8 developers on Twitter, he even referred on how Webpack (pretty 
popular and well known JavaScript package) achieves crazy improvements on 
their latest iteration:

https://mobile.twitter.com/bmeurer/status/969599687274745856


-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/d7e7e0a7-f604-425d-a689-2f6cc2e44ec5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Re: Are functions which defined using eval or new Function() optimized?

2018-03-02 Thread Parsa Ghadimi
Hi
You can take a look at Node's VM module. (require use that module
internally).

On 2 March 2018 at 19:25, Koray  wrote:

> Hello,
>
> Thanks for your response. Main reason is I'm mostly a beginner so for
> the time being this is the only way I know. There will be multiple
> active sockets at any given time and they will be interacting, so I
> want to be able to roll changes in without having to restart.
>
> Koray
>
> On 3/2/18, Zlatko  wrote:
> > Hi,
> >
> > Good question! V8 Googlers say nothing eval does is optimized and almost
> > absolutely must be avoided (and they same for Function constructor IIRC)
> -
> > but what about the product of it?  I don't know, maybe you can run a few
> > tests with v8-debug. I would be interested in results if you do run such
> a
> > test.
> >
> > But I have another question: why would you deploy new code this way?
> Can't
> > you have some continuous deployment, partial rollouts etc this way? Or
> send
> >
> > all requests for unknown functionality to a pubsub, and then attach your
> > new code there to respond?
> >
> > --
> > Job board: http://jobs.nodejs.org/
> > New group rules:
> > https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> > Old group rules:
> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "nodejs" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to nodejs+unsubscr...@googlegroups.com.
> > To post to this group, send email to nodejs@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/nodejs/bbbd3192-1a76-
> 4221-8be5-652794b3d693%40googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules: https://gist.github.com/othiym23/9886289#file-
> moderation-policy-md
> Old group rules: https://github.com/joyent/node/wiki/Mailing-List-
> Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/nodejs/CAHW%3DSBGMEfpZCYVppQnCtRrzx4Gu0_
> THSP%2BS3U0M7acLRg9M0g%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAPNuDSC%3D%2BJPNS%2BE4sxKGSwNs18ZKcg7fZssKC-xV6nHeOmr5xQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [nodejs] Re: Are functions which defined using eval or new Function() optimized?

2018-03-02 Thread Koray
Hello,

Thanks for your response. Main reason is I'm mostly a beginner so for
the time being this is the only way I know. There will be multiple
active sockets at any given time and they will be interacting, so I
want to be able to roll changes in without having to restart.

Koray

On 3/2/18, Zlatko  wrote:
> Hi,
>
> Good question! V8 Googlers say nothing eval does is optimized and almost
> absolutely must be avoided (and they same for Function constructor IIRC) -
> but what about the product of it?  I don't know, maybe you can run a few
> tests with v8-debug. I would be interested in results if you do run such a
> test.
>
> But I have another question: why would you deploy new code this way? Can't
> you have some continuous deployment, partial rollouts etc this way? Or send
>
> all requests for unknown functionality to a pubsub, and then attach your
> new code there to respond?
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/bbbd3192-1a76-4221-8be5-652794b3d693%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHW%3DSBGMEfpZCYVppQnCtRrzx4Gu0_THSP%2BS3U0M7acLRg9M0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[nodejs] Re: Are functions which defined using eval or new Function() optimized?

2018-03-02 Thread Zlatko
Hi,

Good question! V8 Googlers say nothing eval does is optimized and almost 
absolutely must be avoided (and they same for Function constructor IIRC) - 
but what about the product of it?  I don't know, maybe you can run a few 
tests with v8-debug. I would be interested in results if you do run such a 
test.

But I have another question: why would you deploy new code this way? Can't 
you have some continuous deployment, partial rollouts etc this way? Or send 
all requests for unknown functionality to a pubsub, and then attach your 
new code there to respond?

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/bbbd3192-1a76-4221-8be5-652794b3d693%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.