Commit Graph

7484 Commits (79ec9dc1dd09a3d05417b95f7c8bf5177e360153)

Author SHA1 Message Date
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
isaacs f63af64eb8 test-pummel: Add call validation in net-write-callbacks 2012-12-19 10:55:23 -08:00
isaacs f3f4e290e0 test: 2 resume() calls needed to flush streams 2012-12-19 10:55:23 -08:00
Timothy J Fontaine 14ed1732ce test: add TAP output to the test runner 2012-12-19 11:16:23 +01:00
isaacs 43538f4f8f 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.
2012-12-18 11:56:53 -08:00
isaacs 04adf0e5a1 blog: post about streams2 feature 2012-12-18 08:45:03 -08:00
Ben Noordhuis d607d856af 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.
2012-12-18 16:16:33 +01:00
Ben Noordhuis 8ccfed2edc 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.
2012-12-18 16:07:31 +01:00
Ben Noordhuis 7b2ef2de20 deps: upgrade libuv to dc559a5 2012-12-18 15:46:00 +01:00
Fedor Indutny ba754524a9 deps: upgrade libuv to b86ed94 2012-12-18 14:15:02 +04:00
isaacs 82c7c84e25 net: Handle sync writable streams synchronously
This fixes the case where stderr doesn't flush before the process exits.
2012-12-17 15:08:57 -08:00
isaacs 6c5356bfe2 Revert "buffer: allocate memory with mmap()"
Also Revert "buffer: use MAP_ANON, fix OS X build"

This reverts commit ddb15603e7.
This reverts commit 2433ec8276.
2012-12-17 10:47:17 -08:00
Dean McNamee 1c265c54a2 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().
2012-12-17 17:37:51 +01:00
Dean McNamee ba00fb0199 typed arrays: re-export SizeOfArrayElementForType()
Although it is not used externally by node, it is needed by upstream and Plask.

This effectively reverts:

    commit 1444801374
    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.
2012-12-17 17:37:51 +01:00
Nicolas Chambrier 496c0bd936 doc: add Google+ French community 2012-12-17 17:21:35 +01:00
Fedor Indutny a3877ab53e Revert "build: enable DEAD_CODE_STRIPPING on OS X"
This reverts commit 02dffb063e.
DEAD_CODE_STRIPPING is stripping out CRYPTO_set_add_lock_callback
symbol on which some addons are relying.
2012-12-17 19:20:44 +04:00
Ben Noordhuis 53b826e6ae install: fix openbsd man page location
Man pages go into $PREFIX/man on OpenBSD, not $PREFIX/share/man.
2012-12-17 12:05:14 +01:00
Ben Noordhuis ddb15603e7 buffer: use MAP_ANON, fix OS X build 2012-12-17 11:29:03 +01:00
isaacs 945f877d30 test: Fix test-https-localaddress*
Fix #4418
2012-12-16 14:40:24 -08:00
Brian White 827b2a9b0b 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.
2012-12-16 17:25:03 +01:00
Ben Noordhuis 2433ec8276 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.
2012-12-16 10:19:09 +01:00
isaacs 01db736c8d Merge branch 'streams2' 2012-12-15 10:29:16 -08:00
isaacs cd51fa8f5a test: Update message tests for streams2 2012-12-14 17:46:24 -08:00
isaacs abbd47e4a3 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.
2012-12-14 17:46:23 -08:00
isaacs 3751c0fe40 streams2: Still emit error if there was a write() cb 2012-12-14 17:46:23 -08:00
isaacs 19ecc3a4a6 test updates for streams2 2012-12-14 17:46:23 -08:00
isaacs 0977638ffb test: Fix many tests for http streams2 refactor 2012-12-14 17:46:23 -08:00
isaacs 1d369317ea 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.
2012-12-14 17:46:23 -08:00
isaacs 81e356279d child_process: Remove stream.pause/resume calls
Unnecessary in streams2
2012-12-14 10:52:30 -08:00
isaacs b4df1e62de test updates 2012-12-14 10:52:30 -08:00
isaacs bb56dcc450 tty/stdin: Refactor for streams2 2012-12-14 10:52:30 -08:00
isaacs 695abba5ac test: Fix many tests for streams2 net refactor 2012-12-14 10:52:30 -08:00
isaacs 8a3befa0c6 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
2012-12-14 10:52:30 -08:00