Due to node's single thread execution, high CPU tasks should be offloaded
to a queue for other processes to process. However, is there any easy way
to figure out how long a section of code is taking? I could do the brute
force way of putting in a bunch of start = current time, end = end time,
Source: http://code.google.com/p/v8/issues/detail?id=2355
I think generators have the potential to greatly change how node.js code is
written (for example it could look like this http://taskjs.org). However,
it depends on many factors:
1) How easy will it be to migrate existing node.js code?
I was recently excited to find out that V8 is starting work on adding
generators support. Then I heard about asm.js and looked into Firefox's
*Monkey (OdinMonkey, SpiderMonkey, etc.) series of JS engines. Performance
is good, they've already implemented many ECMAScript 6 features, and now
asm
I'm using node 0.11.3 with --harmony-generators to try the new feature. I
found two libraries that should help use existing node callback-based code
with generators (suspend and galaxy). The code I'm trying to run was
similar to the following:
(using suspend)
var fs = require('fs');
var requ
e than
just network async programming.
On Friday, July 12, 2013 2:47:28 PM UTC-7, cpprototypes wrote:
>
> I'm using node 0.11.3 with --harmony-generators to try the new feature. I
> found two libraries that should help use existing node callback-based code
> with generators (susp
UTC-7, cpprototypes wrote:
>
> I'm using node 0.11.3 with --harmony-generators to try the new feature. I
> found two libraries that should help use existing node callback-based code
> with generators (suspend and galaxy). The code I'm trying to run was
> similar to
The core of node.js is a single threaded event loop. Events get pushed
onto a queue and the event loop thread pops off events for processing. Is
it theoretically possible for the event loop itself to be multithreaded?
There's already a queue of things ready to be processed. What if there
we