Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.4.0 propose #4392

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7435491
lib: use arrow functions instead of bind
JungMinu Aug 21, 2015
8c71854
doc: fix link in addons.markdown
secretfader Dec 17, 2015
1dd09a8
doc: Typo in buffer.markdown referencing buf.write()
chrisJohn404 Dec 17, 2015
46c44c8
doc: fix, modernize examples in docs
jasnell Dec 14, 2015
645577f
http: Remove an unnecessary assignment
gigabo Dec 17, 2015
1a07eab
debugger: guard against call from non-node context
bnoordhuis Dec 17, 2015
d187c6e
test: try other ipv6 localhost alternatives
mscdex Dec 17, 2015
89c32bc
node: fix erroneously named function call
trevnorris Nov 10, 2015
369f795
http_parser: use pushValueToArray for headers
trevnorris Nov 10, 2015
3f19d4a
fs: use pushValueToArray for readdir(Sync)
trevnorris Nov 10, 2015
4f07866
node: improve GetActiveHandles performance
trevnorris Nov 11, 2015
b73bb71
node: improve performance of hrtime()
trevnorris Nov 11, 2015
e808658
node: improve accessor perf of process.env
trevnorris Nov 11, 2015
6406dbb
crypto: load PFX chain the same way as regular one
indutny Dec 5, 2015
569e5eb
test: fix flaky test-net-error-twice
mscdex Dec 18, 2015
72b6b4f
module: always decorate thrown errors
mscdex Dec 15, 2015
09c9110
repl: use String#repeat instead of Array#join
evanlucas Nov 18, 2015
dd935c2
assert: typed array deepequal performance fix
claudiorodriguez Dec 17, 2015
8168669
http: remove excess calls to removeSocket
Dec 6, 2015
2888ec3
src: remove forwards for v8::GC*logueCallback
ofrobots Dec 21, 2015
1009a82
repl: Fixed node repl history edge case.
zeusdeux Dec 1, 2015
b7fd395
2015-12-22, Version 5.3.1 (Stable)
Fishrock123 Dec 22, 2015
d3d2216
Working on v5.3.2
Fishrock123 Dec 22, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# Node.js ChangeLog

## 2015-12-22, Version 5.3.1 (Stable), @Fishrock123

### Notable changes

* **general**: Several minor performance improvements:
- **lib**: Use arrow functions instead of bind where possible (Minwoo Jung) [nodejs/node#3622](https://github.com/nodejs/node/pull/3622).
- **node**: Improved accessor perf of `process.env` (Trevor Norris) [nodejs/node#3780](https://github.com/nodejs/node/pull/3780).
- **node**: Improved performance of `hrtime()` (Trevor Norris) [nodejs/node#3780](https://github.com/nodejs/node/pull/3780).
- **node**: Improved GetActiveHandles performance (Trevor Norris) [nodejs/node#3780](https://github.com/nodejs/node/pull/3780).
* **module**: Errors during `require()` now provide more information (Brian White) [nodejs/node#4287](https://github.com/nodejs/node/pull/4287).

### Known issues

* Surrogate pair in REPL can freeze terminal. [#690](https://github.com/nodejs/node/issues/690)
* Calling `dns.setServers()` while a DNS query is in progress can cause the process to crash on a failed assertion. [#894](https://github.com/nodejs/node/issues/894)
* `url.resolve` may transfer the auth portion of the url when resolving between two full hosts, see [#1435](https://github.com/nodejs/node/issues/1435).
* Unicode characters in filesystem paths are not handled consistently across platforms or Node.js APIs. See [#2088](https://github.com/nodejs/node/issues/2088), [#3401](https://github.com/nodejs/node/issues/3401) and [#3519](https://github.com/nodejs/node/issues/3519).

### Commits

* [[`dd935c2a5d`](https://github.com/v5.3.0/HEAD/commit/dd935c2a5d)] - **assert**: typed array deepequal performance fix (Claudio Rodriguez) [nodejs/node#4330](https://github.com/nodejs/node/pull/4330)
* [[`6406dbb4b2`](https://github.com/v5.3.0/HEAD/commit/6406dbb4b2)] - **crypto**: load PFX chain the same way as regular one (Fedor Indutny) [nodejs/node#4165](https://github.com/nodejs/node/pull/4165)
* [[`1a07eabe7b`](https://github.com/v5.3.0/HEAD/commit/1a07eabe7b)] - **debugger**: guard against call from non-node context (Ben Noordhuis) [nodejs/node#4328](https://github.com/nodejs/node/pull/4328)
* [[`46c44c830f`](https://github.com/v5.3.0/HEAD/commit/46c44c830f)] - **doc**: fix, modernize examples in docs (James M Snell) [nodejs/node#4282](https://github.com/nodejs/node/pull/4282)
* [[`1dd09a8fba`](https://github.com/v5.3.0/HEAD/commit/1dd09a8fba)] - **doc**: Typo in buffer.markdown referencing buf.write() (chrisjohn404) [nodejs/node#4324](https://github.com/nodejs/node/pull/4324)
* [[`8c718543ad`](https://github.com/v5.3.0/HEAD/commit/8c718543ad)] - **doc**: fix link in addons.markdown (Nicholas Young) [nodejs/node#4331](https://github.com/nodejs/node/pull/4331)
* [[`3f19d4a320`](https://github.com/v5.3.0/HEAD/commit/3f19d4a320)] - **fs**: use pushValueToArray for readdir(Sync) (Trevor Norris) [nodejs/node#3780](https://github.com/nodejs/node/pull/3780)
* [[`8168669b03`](https://github.com/v5.3.0/HEAD/commit/8168669b03)] - **http**: remove excess calls to removeSocket (Dave) [nodejs/node#4172](https://github.com/nodejs/node/pull/4172)
* [[`645577f55f`](https://github.com/v5.3.0/HEAD/commit/645577f55f)] - **http**: Remove an unnecessary assignment (Bo Borgerson) [nodejs/node#4323](https://github.com/nodejs/node/pull/4323)
* [[`369f795132`](https://github.com/v5.3.0/HEAD/commit/369f795132)] - **http_parser**: use pushValueToArray for headers (Trevor Norris) [nodejs/node#3780](https://github.com/nodejs/node/pull/3780)
* [[`7435491fab`](https://github.com/v5.3.0/HEAD/commit/7435491fab)] - **lib**: use arrow functions instead of bind (Minwoo Jung) [nodejs/node#3622](https://github.com/nodejs/node/pull/3622)
* [[`72b6b4f70c`](https://github.com/v5.3.0/HEAD/commit/72b6b4f70c)] - **module**: always decorate thrown errors (Brian White) [nodejs/node#4287](https://github.com/nodejs/node/pull/4287)
* [[`e80865835f`](https://github.com/v5.3.0/HEAD/commit/e80865835f)] - **node**: improve accessor perf of process.env (Trevor Norris) [nodejs/node#3780](https://github.com/nodejs/node/pull/3780)
* [[`b73bb71ab4`](https://github.com/v5.3.0/HEAD/commit/b73bb71ab4)] - **node**: improve performance of hrtime() (Trevor Norris) [nodejs/node#3780](https://github.com/nodejs/node/pull/3780)
* [[`4f078661f3`](https://github.com/v5.3.0/HEAD/commit/4f078661f3)] - **node**: improve GetActiveHandles performance (Trevor Norris) [nodejs/node#3780](https://github.com/nodejs/node/pull/3780)
* [[`89c32bc491`](https://github.com/v5.3.0/HEAD/commit/89c32bc491)] - **node**: fix erroneously named function call (Trevor Norris) [nodejs/node#3780](https://github.com/nodejs/node/pull/3780)
* [[`1009a82d82`](https://github.com/v5.3.0/HEAD/commit/1009a82d82)] - **repl**: Fixed node repl history edge case. (Mudit Ameta) [nodejs/node#4108](https://github.com/nodejs/node/pull/4108)
* [[`09c9110486`](https://github.com/v5.3.0/HEAD/commit/09c9110486)] - **repl**: use String#repeat instead of Array#join (Evan Lucas) [nodejs/node#3900](https://github.com/nodejs/node/pull/3900)
* [[`2888ec3d57`](https://github.com/v5.3.0/HEAD/commit/2888ec3d57)] - **src**: remove forwards for v8::GC*logueCallback (Ali Ijaz Sheikh) [nodejs/node#4381](https://github.com/nodejs/node/pull/4381)
* [[`569e5eb9bb`](https://github.com/v5.3.0/HEAD/commit/569e5eb9bb)] - **test**: fix flaky test-net-error-twice (Brian White) [nodejs/node#4342](https://github.com/nodejs/node/pull/4342)
* [[`d187c6e800`](https://github.com/v5.3.0/HEAD/commit/d187c6e800)] - **test**: try other ipv6 localhost alternatives (Brian White) [nodejs/node#4325](https://github.com/nodejs/node/pull/4325)

## 2015-12-16, Version 5.3.0 (Stable), @cjihrig

### Notable changes
Expand Down
37 changes: 37 additions & 0 deletions benchmark/assert/deepequal-prims-and-objs-big-array.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
'use strict';
var common = require('../common.js');
var assert = require('assert');
var bench = common.createBenchmark(main, {
prim: [
null,
undefined,
'a',
1,
true,
{0: 'a'},
[1, 2, 3],
new Array([1, 2, 3])
],
n: [25]
});

function main(conf) {
var prim = conf.prim;
var n = +conf.n;
var primArray;
var primArrayCompare;
var x;

primArray = new Array();
primArrayCompare = new Array();
for (x = 0; x < (1e5); x++) {
primArray.push(prim);
primArrayCompare.push(prim);
}

bench.start();
for (x = 0; x < n; x++) {
assert.deepEqual(primArray, primArrayCompare);
}
bench.end(n);
}
30 changes: 30 additions & 0 deletions benchmark/assert/deepequal-prims-and-objs-big-loop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use strict';
var common = require('../common.js');
var assert = require('assert');
var bench = common.createBenchmark(main, {
prim: [
null,
undefined,
'a',
1,
true,
{0: 'a'},
[1, 2, 3],
new Array([1, 2, 3])
],
n: [1e5]
});

function main(conf) {
var prim = conf.prim;
var n = +conf.n;
var x;

bench.start();

for (x = 0; x < n; x++) {
assert.deepEqual(new Array([prim]), new Array([prim]));
}

bench.end(n);
}
22 changes: 22 additions & 0 deletions benchmark/assert/deepequal-typedarrays.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict';
var common = require('../common.js');
var assert = require('assert');
var bench = common.createBenchmark(main, {
type: ('Int8Array Uint8Array Int16Array Uint16Array Int32Array Uint32Array ' +
'Float32Array Float64Array Uint8ClampedArray').split(' '),
n: [1]
});

function main(conf) {
var type = conf.type;
var clazz = global[type];
var n = +conf.n;

bench.start();
var actual = new clazz(n * 1e6);
var expected = new clazz(n * 1e6);

assert.deepEqual(actual, expected);

bench.end(n);
}
22 changes: 22 additions & 0 deletions benchmark/fs/bench-readdir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict';

const common = require('../common');
const fs = require('fs');

const bench = common.createBenchmark(main, {
n: [1e4],
});


function main(conf) {
const n = conf.n >>> 0;

bench.start();
(function r(cntr) {
if (--cntr <= 0)
return bench.end(n);
fs.readdir(__dirname + '/../../lib/', function() {
r(cntr);
});
}(n));
}
19 changes: 19 additions & 0 deletions benchmark/fs/bench-readdirSync.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use strict';

const common = require('../common');
const fs = require('fs');

const bench = common.createBenchmark(main, {
n: [1e4],
});


function main(conf) {
const n = conf.n >>> 0;

bench.start();
for (var i = 0; i < n; i++) {
fs.readdirSync(__dirname + '/../../lib/');
}
bench.end(n);
}
55 changes: 55 additions & 0 deletions benchmark/http/bench-parser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
'use strict';

const common = require('../common');
const HTTPParser = process.binding('http_parser').HTTPParser;
const REQUEST = HTTPParser.REQUEST;
const kOnHeaders = HTTPParser.kOnHeaders | 0;
const kOnHeadersComplete = HTTPParser.kOnHeadersComplete | 0;
const kOnBody = HTTPParser.kOnBody | 0;
const kOnMessageComplete = HTTPParser.kOnMessageComplete | 0;
const CRLF = '\r\n';

const bench = common.createBenchmark(main, {
fields: [4, 8, 16, 32],
n: [1e5],
});


function main(conf) {
const fields = conf.fields >>> 0;
const n = conf.n >>> 0;
var header = `GET /hello HTTP/1.1${CRLF}Content-Type: text/plain${CRLF}`;

for (var i = 0; i < fields; i++) {
header += `X-Filler${i}: ${Math.random().toString(36).substr(2)}${CRLF}`;
}
header += CRLF;

processHeader(new Buffer(header), n);
}


function processHeader(header, n) {
const parser = newParser(REQUEST);

bench.start();
for (var i = 0; i < n; i++) {
parser.execute(header, 0, header.length);
parser.reinitialize(REQUEST);
}
bench.end(n);
}


function newParser(type) {
const parser = new HTTPParser(type);

parser.headers = [];

parser[kOnHeaders] = function() { };
parser[kOnHeadersComplete] = function() { };
parser[kOnBody] = function() { };
parser[kOnMessageComplete] = function() { };

return parser;
}
18 changes: 18 additions & 0 deletions benchmark/misc/bench-env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

const common = require('../common');

const bench = common.createBenchmark(main, {
n: [1e5],
});


function main(conf) {
const n = conf.n >>> 0;
bench.start();
for (var i = 0; i < n; i++) {
// Access every item in object to process values.
Object.keys(process.env);
}
bench.end(n);
}
18 changes: 18 additions & 0 deletions benchmark/misc/bench-hrtime.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

const common = require('../common');

const bench = common.createBenchmark(main, {
n: [1e6]
});


function main(conf) {
const n = conf.n >>> 0;

bench.start();
for (var i = 0; i < n; i++) {
process.hrtime();
}
bench.end(n);
}
20 changes: 10 additions & 10 deletions doc/api/addons.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ You can now use the binary addon in a Node.js project `hello.js` by pointing
`require` to the recently built `hello.node` module:

// hello.js
var addon = require('./build/Release/addon');
const addon = require('./build/Release/addon');

console.log(addon.hello()); // 'world'

Expand Down Expand Up @@ -189,7 +189,7 @@ function calls and return a result. This is the main and only needed source
You can test it with the following JavaScript snippet:

// test.js
var addon = require('./build/Release/addon');
const addon = require('./build/Release/addon');

console.log( 'This should be eight:', addon.add(3,5) );

Expand Down Expand Up @@ -237,7 +237,7 @@ adding the function as a property of `exports`.
To test it, run the following JavaScript snippet:

// test.js
var addon = require('./build/Release/addon');
const addon = require('./build/Release/addon');

addon(function(msg){
console.log(msg); // 'hello world'
Expand Down Expand Up @@ -282,7 +282,7 @@ the string passed to `createObject()`:
To test it in JavaScript:

// test.js
var addon = require('./build/Release/addon');
const addon = require('./build/Release/addon');

var obj1 = addon('hello');
var obj2 = addon('world');
Expand Down Expand Up @@ -336,7 +336,7 @@ wraps a C++ function:
To test:

// test.js
var addon = require('./build/Release/addon');
const addon = require('./build/Release/addon');

var fn = addon();
console.log(fn()); // 'hello world'
Expand Down Expand Up @@ -470,7 +470,7 @@ prototype:
Test it with:

// test.js
var addon = require('./build/Release/addon');
const addon = require('./build/Release/addon');

var obj = new addon.MyObject(10);
console.log( obj.plusOne() ); // 11
Expand Down Expand Up @@ -630,7 +630,7 @@ The implementation is similar to the above in `myobject.cc`:
Test it with:

// test.js
var createObject = require('./build/Release/addon');
const createObject = require('./build/Release/addon');

var obj = createObject(10);
console.log( obj.plusOne() ); // 11
Expand Down Expand Up @@ -792,7 +792,7 @@ The implementation of `myobject.cc` is similar to before:
Test it with:

// test.js
var addon = require('./build/Release/addon');
const addon = require('./build/Release/addon');

var obj1 = addon.createObject(10);
var obj2 = addon.createObject(20);
Expand Down Expand Up @@ -866,11 +866,11 @@ The file `addon.cc` implements AtExit below:
Test in JavaScript by running:

// test.js
var addon = require('./build/Release/addon');
const addon = require('./build/Release/addon');

[online]: https://v8docs.nodesource.com/
[libuv]: https://github.com/libuv/libuv
[download]: https://github.com/rvagg/node-addon-examples
[download]: https://github.com/nodejs/node-addon-examples
[node-gyp]: https://github.com/nodejs/node-gyp
[v8 reference]: http://izs.me/v8-docs/main.html
[Embedder's Guide]: https://code.google.com/apis/v8/embed.html
Loading