- Early work by Ihab Awad (Google) and Kris Kowal (FastSoft)
- 2009-09: 2nd draft of module strawman, still very close to "closures as modules",
export x = 42
This is a short write-up that explains why test/addons/make-callback-recurse/test.js
in github.com/nodejs/node/pull/4507
fails with the following error message:
$ node test.js
d2 error
/Users/JulienGilli/dev/node/node/test/addons/make-callback-recurse/test.js:88
throw new Error('test d1');
$ gdb --args ./iojs_g -pe 'process.hrtime([0,0])' | |
(gdb) source deps/v8/tools/gdbinit | |
(gdb) b node::Hrtime | |
Breakpoint 1 at 0x1282619: file ../src/node.cc, line 2028. | |
(gdb) r | |
Starting program: /usr/local/google/home/ofrobots/src/io.js/iojs_g -pe process.hrtime\(\[0,0\]\) | |
... | |
Breakpoint 1, node::Hrtime (args=...) at ../src/node.cc:2028 |
{ | |
'ecmaFeatures': { | |
'binaryLiterals': true, | |
'blockBindings': true, | |
'forOf': true, | |
'generators': true, | |
'octalLiterals': true, | |
'templateStrings': true, | |
}, | |
'env': { |
Embedders of V8 should generally use the head of the branch corresponding to the minor version of V8 that ships in Chrome.
To find out what version this is,
- Go to https://omahaproxy.appspot.com/
- Find the latest stable Chrome version in the table
- Enter it into the "Translate a Chrome verison to a V8 version" box below the table.
- Ignore the last two parts.
Notes:
- Text in [[ ]] are the internal libuv function call.
- Text in {{ }} are the Node functions that are affected.
- Text in ( ) are notes about what is happening.
- While the Windows event loop has minor variations, I don't believe any of those affect Node.
On process.nextTick()
:
The prep-script.sh
will setup the latest Node and install the latest perf version on your Linux box.
When you want to generate the flame graph, run the following (folder locations taken from install script):
sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading http://unix.stackexchange.com/questions/14227/do-i-need-root-admin-permissions-to-run-userspace-perf-tool-perf-events-ar )
sudo sysctl kernel.perf_event_paranoid=0
the goal: to do fast virtual host routing, e.g. to have a single process on a machine listening on port 80 and proxying data based on HTTP Host to other non-port-80 web processes on the same machine
many people use nginx for this because nginx is faster than node is currently for data-heavy applications (see below)
they use the JS proxies from https://github.com/substack/bouncy/tree/master/bench
As configured in my dotfiles.
start new:
tmux
start new with session name: