Ryunosuke SATO
fde338bf83
stream: speed up instantiation of readable stream
...
- Stream.apply -> Stream.call
2012-12-27 17:46:34 -08:00
Ryunosuke SATO
697484df82
domain: speed up domain.create
...
Use `EventEmitter.call` instead of `EventEmitter.apply` because of performance.
2012-12-27 17:45:36 -08:00
Ryunosuke SATO
8936868e9b
http: remove unused variable
...
The module variable `END_OF_FILE` was no longer needed from 1d369317 .
2012-12-27 15:09:04 -08:00
isaacs
4be9c695f0
build: Add hyphen to custom build tags
...
so that ./configure --tag=foo makes a version number like v0.9.5-foo
instead of v0.9.5foo
2012-12-26 20:35:00 -08:00
isaacs
d76eacd4e6
http: Handle end only when stream is not dumped
...
This fixes regression introduced in some cases by 8bf0c15
2012-12-26 15:57:49 -08:00
Ryunosuke SATO
0db521d0b0
repl: remove 'repl' from automatic loading libs
...
In repl, calling `repl` twice shows the following message:
```
> repl
A different "repl" already exists globally
```
2012-12-26 15:25:00 -08:00
Ryunosuke SATO
31cffae2ba
repl: add 'domain' to automatic loading libs
...
`domain` should be a member of automatic loading libs in `repl`.
Conflicts:
lib/repl.js
2012-12-26 15:23:31 -08:00
Shigeki Ohtsu
8bf0c15a5b
stream2: fix to emit end event on http.ClientResponse
2012-12-26 15:20:48 -08:00
Andreas Madsen
ce30683012
doc: document the finish event
...
Since the stream implementer is not expected to overwrite
.end() the finish event is necessary in order to know when
no more data can be written
2012-12-26 14:56:02 -08:00
Andreas Madsen
d68ee22dda
stream: do only fake drain when unpiped stream is the source
...
If the destination had multiply read streams piped to it,
they would all decrease the awaitDrain state and thereby
start the flow
2012-12-26 14:56:02 -08:00
Andreas Madsen
5daa701aba
stream: fix event handler leak in readstream pipe and unpipe
...
After a stream was unpiped there would stil be residual event handlers
2012-12-26 14:56:02 -08:00
Ryunosuke SATO
27a91387ae
util: fix deprecation message in util.pump
2012-12-26 14:54:56 -08:00
Ben Noordhuis
d2e7ca0449
test: add regression test for #4463
2012-12-25 22:18:57 +01:00
Ben Taber
526d852565
net: allow socket end before connect
...
Fix a bug where calling .end() on a socket without calling .connect() first
throws a TypeError:
TypeError: Cannot read property 'shutdown' of undefined
at Socket.onSocketFinish (net.js:194:20)
at Socket.EventEmitter.emit (events.js:91:17)
at Socket.Writable.end (_stream_writable.js:281:10)
at Socket.end (net.js:352:31)
Fixes #4463 .
2012-12-25 22:18:56 +01:00
Ben Noordhuis
6ecb0cd65d
openssl: clean up openssl.gyp
...
Remove obsolete build configuration that escaped the purge in 7eaea7f .
2012-12-24 16:02:13 +01:00
Maciej Małecki
f84bf5b6b1
build: allow to specify custom tags
...
When building custom `node` versions (e.g., floating features/fixes from
different versions) it's often useful to specify a custom tag which
easily identifies build when invoking `node -v`.
Introduce a way to specify this tag in `node_version.h` file or by
running `./configure --tag="<tag>"`. Insert it right after the patch
version (and before `-pre`, if build is not a release).
Closes #4452 .
2012-12-21 12:44:33 -08:00
isaacs
70eb227e80
Now working on 0.9.5
2012-12-21 12:36:34 -08:00
isaacs
cdcac49cfe
Merge branch 'v0.9.4-release'
2012-12-21 12:36:04 -08:00
isaacs
d86d83c75f
2012.12.21, Version 0.9.4 (Unstable)
...
* streams: Update all streaming interfaces to use new classes (isaacs)
* node: remove idle gc (Ben Noordhuis)
* http: protect against response splitting attacks (Bert Belder)
* fs: Raise error when null bytes detected in paths (isaacs)
* fs: fix 'object is not a function' callback errors (Ben Noordhuis)
* fs: add autoClose=true option to fs.createReadStream (Farid Neshat)
* process: add getgroups(), setgroups(), initgroups() (Ben Noordhuis)
* openssl: optimized asm code on x86 and x64 (Bert Belder)
* crypto: fix leak in GetPeerCertificate (Fedor Indutny)
* add systemtap support (Jan Wynholds)
* windows: add ETW and PerfCounters support (Scott Blomquist)
* windows: fix normalization of UNC paths (Bert Belder)
* crypto: fix ssl error handling (Sergey Kholodilov)
* node: remove eio-emul.h (Ben Noordhuis)
* os: add os.endianness() function (Nathan Rajlich)
* readline: don't emit "line" events with a trailing 'n' char (Nathan Rajlich)
* build: add configure option to generate xcode build files (Timothy J Fontaine)
* build: allow linking against system libuv, cares, http_parser (Stephen Gallagher)
* typed arrays: add slice() support to ArrayBuffer (Anthony Pesch)
* debugger: exit and kill child on SIGTERM or SIGHUP (Fedor Indutny)
* url: url.format escapes delimiters in path and query (J. Lee Coltrane)
v0.9.4
2012-12-21 12:15:05 -08:00
Nathan Rajlich
837df70b75
repl: don't touch require.cache
...
Fixes #3226 .
Consider a production server that uses a REPL to debug. Creating the instance
would wipe out the global cache of modules, and subsequent "require" calls in
the server would be reloaded from disk. The REPL should observe only, without
altering, its environment.
2012-12-21 11:42:40 -08:00
isaacs
982981442d
doc: Nudge formatting to make json generator happy
...
Starting a line with `**bold**` text makes it think that it's a link,
and get confused.
This should really be fixed properly in the doc generator, but for now,
it's not a major issue. It's probably just a matter of updating marked.
2012-12-21 11:32:29 -08:00
isaacs
f119effc9f
Merge remote-tracking branch 'ry/v0.8'
2012-12-21 11:08:32 -08:00
Scott Blomquist
841b7f534b
Ease building with VS Express by checking in generated files.
2012-12-21 11:05:55 -08:00
isaacs
244924823e
stdio: Do not read from stdout/err
...
This fixes windows stdio pipes in streams2 land.
2012-12-21 11:05:46 -08:00
isaacs
0edd93dcc1
test: Fix simple/test-http-localaddress
2012-12-21 16:59:20 +00:00
isaacs
fb915ed957
lint
2012-12-21 16:51:43 +00:00
isaacs
c048c814c7
http: Trivial fix for comments and 'this.read'
2012-12-21 16:48:32 +00:00
isaacs
d30e76e0e8
npm: upgrade to 1.1.70
2012-12-21 16:42:29 +00:00
isaacs
9d0103d22e
blog: More streams2 wordsmithing
2012-12-21 00:46:40 +00:00
isaacs
0c867ae618
blog: Update blog post re streams2
2012-12-21 00:08:50 +00:00
isaacs
ec7455558f
benchmark: Set ephemeral ports properly on sunos
2012-12-21 00:07:35 +00:00
isaacs
825af451fb
benchmark: Make http.sh more useful
2012-12-21 00:07:34 +00:00
isaacs
79ec9dc1dd
benchmark: Support names in http-flamegraph
2012-12-21 00:07:34 +00:00
isaacs
f9caf7020c
streams: Speed up by doing less work in the state ctors
2012-12-21 00:07:34 +00:00
isaacs
8624adf5d8
http: use IncomingMessage._dump() instead of resume()
2012-12-21 00:07:34 +00:00
isaacs
836593da23
benchmark: Improve http-flamegraph
2012-12-21 00:07:34 +00:00
Bert Belder
7475982801
openssl: enable optimized asm code on x86 and x64
2012-12-20 15:02:59 +01:00
Bert Belder
5edbb53c45
openssl: regenerate asm files for openssl 1.0.1
2012-12-20 15:02:59 +01:00
Bert Belder
1b5c5b137d
openssl: update makefile for asm files to work with openssl 1.0.1
2012-12-20 15:02:58 +01:00
Bert Belder
1d97db5acf
openssl: disable HT sidechannel attack mitigation
...
It used to be off before. It's extremely unlikely that such an attack
would be a viable attack against node. And it makes AES much slower.
2012-12-20 15:02:57 +01:00
Bert Belder
aeae22cbb2
openssl: revert empty_OPENSSL_cpuid_setup.patch
2012-12-20 15:02:57 +01:00
Bert Belder
2e6180a62a
openssl: make perlasm target pentium or newer for masm outputs
...
When perlasm generates MASM code it sets the assembler target to 468.
In this mode MASM refuses to assemble a couple of instructions. Bumping
the target to 686 solves this problem.
2012-12-20 15:02:56 +01:00
Bert Belder
7eaea7f9e5
openssl: clean up and merge configuration files
...
This patch brings the openssl library that is built with gyp closer
to what the standard build system produces.
All opensslconf.h versions are now merged into a single file, which
makes it easier for compiled addons to locate this file.
2012-12-20 15:02:56 +01:00
Ben Noordhuis
d1556fbdd2
bench: report stats in benchmark/net-pipe
2012-12-20 14:48:51 +01:00
Ben Noordhuis
79ae8b7ae2
Merge remote-tracking branch 'origin/v0.8'
2012-12-20 12:39:04 +01:00
Ben Noordhuis
5a19c07c08
http: pack response body buffer in first tcp packet
...
Apply the same optimization to res.end(buf) that is applied to res.end(str).
Speeds up `node benchmark/http_simple_auto -k -c 1 -n 25000 buffer/1`
(non-chunked response body) by about 750x. That's not a typo.
Chunked responses:
$ cat tmp/http-chunked-client.js
// Run `node benchmark/http_simple` in another terminal.
var http = require('http'), url = require('url');
var options = url.parse('http://127.0.0.1:8000/buffer/1/1 ');
options.agent = new http.Agent({ maxSockets: 1 });
for (var i = 0; i < 25000; ++i) http.get(options);
Before:
$ time out/Release/node tmp/http-chunked-client.js
real 16m40.411s
user 0m9.184s
sys 0m0.604s
After:
$ time out/Release/node tmp/http-chunked-client.js
real 0m5.386s
user 0m2.768s
sys 0m0.728s
That's still a 185x speed-up.
Fixes #4415 .
2012-12-20 12:02:06 +01:00
Ben Noordhuis
ba407ce410
bench: use res.end() for chunked encoding
...
Use res.end() for the final chunk so we can benchmark the 'hot path' shortcut
in lib/http.js that packs the headers and the body into a single packet.
2012-12-20 11:44:10 +01:00
Farid Neshat
dcaebec208
fs: add autoClose=true option to fs.createReadStream
2012-12-20 11:25:39 +01:00
isaacs
9f4c0988c3
streams2: Process write buffer in a loop, not recursively
...
This fixes pummel/test-net-write-callbacks
2012-12-19 10:55:23 -08:00
isaacs
cab22644a5
net: Properly read buffer in Socket.bytesWritten
2012-12-19 10:55:23 -08:00