Bert Belder [Wed, 12 Sep 2012 23:11:06 +0000 (01:11 +0200)]
openssl: revert empty_OPENSSL_cpuid_setup.patch
Bert Belder [Wed, 12 Sep 2012 23:03:50 +0000 (01:03 +0200)]
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.
Bert Belder [Tue, 25 Sep 2012 01:57:11 +0000 (03:57 +0200)]
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.
Ben Noordhuis [Thu, 20 Dec 2012 13:02:38 +0000 (14:02 +0100)]
bench: report stats in benchmark/net-pipe
Ben Noordhuis [Thu, 20 Dec 2012 11:39:04 +0000 (12:39 +0100)]
Merge remote-tracking branch 'origin/v0.8'
Ben Noordhuis [Wed, 19 Dec 2012 11:35:07 +0000 (12:35 +0100)]
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.
Ben Noordhuis [Wed, 19 Dec 2012 13:09:10 +0000 (14:09 +0100)]
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.
Farid Neshat [Mon, 17 Dec 2012 15:03:19 +0000 (23:03 +0800)]
fs: add autoClose=true option to fs.createReadStream
isaacs [Wed, 19 Dec 2012 17:04:08 +0000 (09:04 -0800)]
streams2: Process write buffer in a loop, not recursively
This fixes pummel/test-net-write-callbacks
isaacs [Wed, 19 Dec 2012 16:57:49 +0000 (08:57 -0800)]
net: Properly read buffer in Socket.bytesWritten
isaacs [Wed, 19 Dec 2012 16:57:05 +0000 (08:57 -0800)]
test-pummel: Add call validation in net-write-callbacks
isaacs [Wed, 19 Dec 2012 16:56:24 +0000 (08:56 -0800)]
test: 2 resume() calls needed to flush streams
Timothy J Fontaine [Wed, 19 Dec 2012 04:10:17 +0000 (23:10 -0500)]
test: add TAP output to the test runner
isaacs [Tue, 18 Dec 2012 19:56:53 +0000 (11:56 -0800)]
benchmark: Add http-flamegraph
This is very similar to http.sh, but generates a flamegraph
with dtrace, pruning off the single-hit stacks so that we can
more easily see the places where relevant amounts of time are
spent.
isaacs [Tue, 18 Dec 2012 16:43:45 +0000 (08:43 -0800)]
blog: post about streams2 feature
Ben Noordhuis [Tue, 18 Dec 2012 06:20:39 +0000 (07:20 +0100)]
node: remove idle gc
Remove the idle garbage collector. Its purpose was to run the garbage collector
when the application is idle but it never worked quite right. Many people have
complained over the years that with heaps > 128 MB, a node.js process never
sleeps anymore; instead, it spends nearly 100% of its CPU time trying to
collect garbage.
Back in the old days, idle GC probably was a good idea. But with V8's current
incremental collector, idle gc appears to offer no time or space benefits
whatsoever and indeed seems actively harmful. Remove it.
Fixes #3870.
Ben Noordhuis [Tue, 18 Dec 2012 08:56:57 +0000 (09:56 +0100)]
node: s/-/_/ in add-on symbol name
Replace dashes with underscores. When loading foo-bar.node, look for
foo_bar_module, not foo-bar_module. The latter is not a legal symbol name.
Ben Noordhuis [Tue, 18 Dec 2012 14:45:33 +0000 (15:45 +0100)]
deps: upgrade libuv to dc559a5
Fedor Indutny [Tue, 18 Dec 2012 10:14:38 +0000 (14:14 +0400)]
deps: upgrade libuv to b86ed94
isaacs [Sun, 16 Dec 2012 20:47:01 +0000 (12:47 -0800)]
net: Handle sync writable streams synchronously
This fixes the case where stderr doesn't flush before the process exits.
isaacs [Mon, 17 Dec 2012 16:45:21 +0000 (08:45 -0800)]
Revert "buffer: allocate memory with mmap()"
Also Revert "buffer: use MAP_ANON, fix OS X build"
This reverts commit
ddb15603e74e9aa865f3e1099dc2cc5886f9c46e.
This reverts commit
2433ec8276838e90136669d5b1215ba597f15fdd.
Dean McNamee [Fri, 7 Dec 2012 21:02:11 +0000 (22:02 +0100)]
typed arrays: fix missing type in SizeOfArrayElementForType()
When Mikael Bourges-Sevenier added support for Uint8ClampedArray in 67fc1da,
the new type was not added to SizeOfArrayElementForType().
Dean McNamee [Fri, 7 Dec 2012 20:59:48 +0000 (21:59 +0100)]
typed arrays: re-export SizeOfArrayElementForType()
Although it is not used externally by node, it is needed by upstream and Plask.
This effectively reverts:
commit
1444801374bafb9a467a7ddeb214a9f92b311b80
Author: Aaron Jacobs <jacobsa@google.com>
Date: Thu Mar 15 13:26:35 2012 +1100
typed arrays: unexport SizeOfArrayElementForType()
It isn't used anywhere else, so made it an implementation detail in
v8_typed_array.cc.
Nicolas Chambrier [Mon, 17 Dec 2012 15:53:52 +0000 (16:53 +0100)]
doc: add Google+ French community
Fedor Indutny [Mon, 17 Dec 2012 11:41:50 +0000 (15:41 +0400)]
Revert "build: enable DEAD_CODE_STRIPPING on OS X"
This reverts commit
02dffb063e423688557e2f8004eb817d7626bf41.
DEAD_CODE_STRIPPING is stripping out CRYPTO_set_add_lock_callback
symbol on which some addons are relying.
Ben Noordhuis [Mon, 17 Dec 2012 11:05:14 +0000 (12:05 +0100)]
install: fix openbsd man page location
Man pages go into $PREFIX/man on OpenBSD, not $PREFIX/share/man.
Ben Noordhuis [Mon, 17 Dec 2012 10:29:03 +0000 (11:29 +0100)]
buffer: use MAP_ANON, fix OS X build
isaacs [Sun, 16 Dec 2012 22:39:59 +0000 (14:39 -0800)]
test: Fix test-https-localaddress*
Fix #4418
Brian White [Tue, 7 Aug 2012 00:42:13 +0000 (20:42 -0400)]
http: bubble up parser errors to ClientRequest
Make parser errors bubble up to the ClientRequest instead of the underlying
net.Socket object.
This is a back-port of commit c78678b from the master branch.
Fixes #3776.
Ben Noordhuis [Sun, 18 Nov 2012 00:14:44 +0000 (01:14 +0100)]
buffer: allocate memory with mmap()
Work around an issue with the glibc malloc() implementation where memory blocks
are never returned to the operating system when they are allocated with brk()
and have overlapping lifecycles.
Fixes #4283.
isaacs [Sat, 15 Dec 2012 18:29:16 +0000 (10:29 -0800)]
Merge branch 'streams2'
isaacs [Sat, 15 Dec 2012 01:43:02 +0000 (17:43 -0800)]
test: Update message tests for streams2
isaacs [Fri, 14 Dec 2012 18:51:04 +0000 (10:51 -0800)]
test: Update simple/test-fs-{write,read}-stream-err for streams2
Streams2 style streams might have already kicked off a read() or write()
before emitting 'data' events. Make the test less dependent on ordering
of when data events occur.
isaacs [Fri, 14 Dec 2012 18:49:16 +0000 (10:49 -0800)]
streams2: Still emit error if there was a write() cb
isaacs [Thu, 13 Dec 2012 15:47:33 +0000 (07:47 -0800)]
test updates for streams2
isaacs [Thu, 13 Dec 2012 17:52:08 +0000 (09:52 -0800)]
test: Fix many tests for http streams2 refactor
isaacs [Thu, 13 Dec 2012 06:24:17 +0000 (22:24 -0800)]
http: Refactor for streams2
Because of some of the peculiarities of http, this has a bit of special
magic to handle cases where the IncomingMessage would wait forever in a
paused state.
In the server, if you do not begin consuming the request body by the
time the response emits 'finish', then it will be flushed out.
In the client, if you do not add a 'response' handler onto the request,
then the response stream will be flushed out.
isaacs [Thu, 8 Nov 2012 01:19:14 +0000 (17:19 -0800)]
child_process: Remove stream.pause/resume calls
Unnecessary in streams2
isaacs [Thu, 13 Dec 2012 06:07:05 +0000 (22:07 -0800)]
test updates
isaacs [Thu, 13 Dec 2012 06:06:35 +0000 (22:06 -0800)]
tty/stdin: Refactor for streams2
isaacs [Thu, 13 Dec 2012 17:51:31 +0000 (09:51 -0800)]
test: Fix many tests for streams2 net refactor
isaacs [Thu, 13 Dec 2012 05:18:57 +0000 (21:18 -0800)]
net: Refactor to use streams2
This is a combination of 6 commits.
* XXX net fixup lcase stream
* net: Refactor to use streams2
Use 'socket.resume()' in many tests to trigger old-mode behavior.
* net: Call destroy() if shutdown() is not provided
This is important for TTY wrap streams
* net: Call .end() in socket.destroySoon if necessary
This makes the http 1.0 keepAlive test pass, also.
* net wtf-ish stuff kinda busted
* net fixup
isaacs [Sun, 9 Dec 2012 23:12:19 +0000 (15:12 -0800)]
benchmark: Add once() function to net-pipe benchmark fixture
isaacs [Thu, 13 Dec 2012 19:15:29 +0000 (11:15 -0800)]
streams2: Remove extraneous bufferSize setting
isaacs [Thu, 13 Dec 2012 19:15:49 +0000 (11:15 -0800)]
docs: streams2
isaacs [Thu, 13 Dec 2012 06:17:57 +0000 (22:17 -0800)]
streams2: Emit pause/resume events
isaacs [Thu, 13 Dec 2012 06:03:19 +0000 (22:03 -0800)]
streams2: Support a Readable hwm of 0
Necessary for proper stdin functioning
isaacs [Wed, 12 Dec 2012 08:59:54 +0000 (00:59 -0800)]
streams2: Writable only emit 'finish' once
isaacs [Mon, 10 Dec 2012 23:58:23 +0000 (15:58 -0800)]
streams2: Call read(0) on resume()
Otherwise (especially with stdin) you sometimes end up in cases
where the high water mark is zero, and the current buffer is at 0,
and it doesn't need a readable event, so it never calls _read().
isaacs [Thu, 6 Dec 2012 18:21:22 +0000 (10:21 -0800)]
lint
isaacs [Thu, 6 Dec 2012 15:29:42 +0000 (07:29 -0800)]
test: Sync writables may emit finish before callbacks
isaacs [Wed, 5 Dec 2012 02:19:07 +0000 (18:19 -0800)]
streams2: NextTick the emit('readable') in resume()
Otherwise resume() will cause data to be emitted before it can be handled.
isaacs [Wed, 5 Dec 2012 01:34:17 +0000 (17:34 -0800)]
streams2: pause() should be immediate
isaacs [Wed, 5 Dec 2012 01:20:12 +0000 (17:20 -0800)]
streams2: Switch to old-mode immediately, not nextTick
This fixes the CONNECT/Upgrade HTTP functionality, which was not getting
sliced properly, because readable wasn't emitted on this tick.
Conflicts:
test/simple/test-http-connect.js
isaacs [Wed, 5 Dec 2012 19:27:46 +0000 (11:27 -0800)]
streams2: Set readable=false on end
isaacs [Tue, 30 Oct 2012 22:46:43 +0000 (15:46 -0700)]
doc: Crypto streaming interface
isaacs [Tue, 30 Oct 2012 18:19:53 +0000 (11:19 -0700)]
test: Tests for streaming crypto interfaces
isaacs [Tue, 30 Oct 2012 17:18:55 +0000 (10:18 -0700)]
crypto: Streaming interface for Sign and Verify
isaacs [Mon, 29 Oct 2012 23:36:20 +0000 (16:36 -0700)]
crypto: Streaming interface for cipher/decipher/iv
isaacs [Mon, 29 Oct 2012 22:21:25 +0000 (15:21 -0700)]
crypto: Streaming api for Hmac
isaacs [Mon, 29 Oct 2012 18:31:59 +0000 (11:31 -0700)]
crypto: Streaming interface for Hash
isaacs [Fri, 5 Oct 2012 15:26:49 +0000 (08:26 -0700)]
test: Writable stream end() method doesn't take a callback
isaacs [Fri, 5 Oct 2012 15:07:12 +0000 (08:07 -0700)]
test: simple/test-file-write-stream needs to use 0 lowWaterMark
isaacs [Tue, 2 Oct 2012 23:54:49 +0000 (16:54 -0700)]
test: Fix test-repl-autolibs inspect call
isaacs [Tue, 2 Oct 2012 23:15:39 +0000 (16:15 -0700)]
zlib: streams2
isaacs [Fri, 5 Oct 2012 00:44:48 +0000 (17:44 -0700)]
fs: streams2
isaacs [Thu, 29 Nov 2012 06:09:28 +0000 (22:09 -0800)]
streams2: Unpipe on dest.emit('close')
isaacs [Thu, 29 Nov 2012 04:45:16 +0000 (20:45 -0800)]
streams2: Remove pipe if the dest emits error
isaacs [Wed, 28 Nov 2012 18:46:24 +0000 (10:46 -0800)]
streams2: Handle pipeChunkSize properly
isaacs [Wed, 28 Nov 2012 02:21:05 +0000 (18:21 -0800)]
streams2: Set 'readable' flag on Readable streams
isaacs [Wed, 28 Nov 2012 09:25:39 +0000 (01:25 -0800)]
streams2: Refactor out .once() usage from Readable.pipe()
isaacs [Wed, 28 Nov 2012 02:20:16 +0000 (18:20 -0800)]
streams2: Get rid of .once() usage in Readable.pipe
Significant performance impact
isaacs [Sat, 17 Nov 2012 04:24:14 +0000 (15:24 +1100)]
streams2: Remove function.bind() usage
It's too slow, unfortunately.
isaacs [Sat, 17 Nov 2012 03:27:41 +0000 (14:27 +1100)]
streams2: Do multipipe without always using forEach
The Array.forEach call is too expensive.
isaacs [Tue, 13 Nov 2012 07:41:17 +0000 (23:41 -0800)]
test: Update stream2 transform for corrected behavior
isaacs [Tue, 13 Nov 2012 07:33:06 +0000 (23:33 -0800)]
streams2: Writable organization, add 'finishing' flag
isaacs [Tue, 13 Nov 2012 07:32:05 +0000 (23:32 -0800)]
streams2: Only emit 'readable' when needed
isaacs [Tue, 13 Nov 2012 07:31:40 +0000 (23:31 -0800)]
streams2: Set Readable lwm to 0 by default
isaacs [Tue, 13 Nov 2012 07:31:25 +0000 (23:31 -0800)]
streams2: Add high water mark for Readable
Also, organize the numeric settings a bit on the ReadableState class
isaacs [Tue, 13 Nov 2012 07:30:10 +0000 (23:30 -0800)]
streams2: Export Readable/Writable State classes
isaacs [Tue, 13 Nov 2012 07:28:56 +0000 (23:28 -0800)]
streams2: Fix duplex no-half-open logic
isaacs [Wed, 31 Oct 2012 21:30:30 +0000 (14:30 -0700)]
streams2: Abstract out onread function
isaacs [Fri, 12 Oct 2012 18:45:17 +0000 (11:45 -0700)]
streams2: Use StringDecoder.end
isaacs [Fri, 12 Oct 2012 17:03:03 +0000 (10:03 -0700)]
streams2: flow() is not always bound to src
isaacs [Wed, 10 Oct 2012 04:56:02 +0000 (21:56 -0700)]
test: fixture for streams2 testing
isaacs [Wed, 10 Oct 2012 00:42:47 +0000 (17:42 -0700)]
streams2: Fix regression from Duplex ctor assignment
isaacs [Wed, 10 Oct 2012 00:37:40 +0000 (17:37 -0700)]
test: Writable bufferizing, non-bufferizing, and callbacks
isaacs [Wed, 10 Oct 2012 00:31:29 +0000 (17:31 -0700)]
streams2: Support write(chunk,[encoding],[callback])
isaacs [Tue, 9 Oct 2012 18:01:53 +0000 (11:01 -0700)]
streams2: Allow Writables to opt out of pre-buffer-izing
isaacs [Mon, 8 Oct 2012 21:43:17 +0000 (14:43 -0700)]
streams2: ctor guards on Stream classes
isaacs [Sun, 7 Oct 2012 20:26:03 +0000 (13:26 -0700)]
streams2: Tests of new interfaces
isaacs [Sun, 7 Oct 2012 20:12:21 +0000 (13:12 -0700)]
streams2: Handle immediate synthetic transforms properly
isaacs [Fri, 5 Oct 2012 14:45:03 +0000 (07:45 -0700)]
streams2: Correct drain/return logic
It was testing the length *before* adding the current chunk, which
is the opposite of correct.
Also, the return value was flipped.
isaacs [Fri, 5 Oct 2012 14:43:34 +0000 (07:43 -0700)]
streams2: Allow 0 as a lowWaterMark value
isaacs [Thu, 4 Oct 2012 23:58:43 +0000 (16:58 -0700)]
transform: Automatically read() on _write when read buffer is empty
isaacs [Thu, 4 Oct 2012 20:26:16 +0000 (13:26 -0700)]
streams2: Make Transform streams pull-style
That is, the transform is triggered by a _read, not by a _write.
This way, backpressure works properly.
isaacs [Wed, 3 Oct 2012 23:52:14 +0000 (16:52 -0700)]
streams2: setEncoding and abstract out endReadable
isaacs [Thu, 4 Oct 2012 00:43:27 +0000 (17:43 -0700)]
streams2: Set flowing=true when flowing
isaacs [Tue, 2 Oct 2012 23:28:02 +0000 (16:28 -0700)]
streams2: Convert strings to buffers before passing to _write()
isaacs [Tue, 2 Oct 2012 22:44:50 +0000 (15:44 -0700)]
streams2: The new stream base classes