0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

7461 Commits

Author SHA1 Message Date
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
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
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
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
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
isaacs
7742257feb benchmark: Add once() function to net-pipe benchmark fixture 2012-12-14 10:52:29 -08:00
isaacs
854171dc6f streams2: Remove extraneous bufferSize setting 2012-12-14 10:52:29 -08:00
isaacs
20a88feb8f docs: streams2 2012-12-14 10:52:29 -08:00
isaacs
04541cf7bc streams2: Emit pause/resume events 2012-12-14 10:52:29 -08:00
isaacs
8fe7b0c910 streams2: Support a Readable hwm of 0
Necessary for proper stdin functioning
2012-12-14 10:52:29 -08:00
isaacs
5760244cc6 streams2: Writable only emit 'finish' once 2012-12-14 10:52:28 -08:00
isaacs
8f428f3b0d 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().
2012-12-14 10:52:28 -08:00
isaacs
fc7d8d59f7 lint 2012-12-14 10:52:28 -08:00
isaacs
f8bb031bdc test: Sync writables may emit finish before callbacks 2012-12-14 10:52:28 -08:00
isaacs
dbcacc5afe streams2: NextTick the emit('readable') in resume()
Otherwise resume() will cause data to be emitted before it can be handled.
2012-12-14 10:52:28 -08:00
isaacs
99021b7a4f streams2: pause() should be immediate 2012-12-14 10:52:28 -08:00
isaacs
42981e2aad 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
2012-12-14 10:52:28 -08:00
isaacs
83704f1279 streams2: Set readable=false on end 2012-12-14 10:52:27 -08:00
isaacs
4a32d53155 doc: Crypto streaming interface 2012-12-14 10:52:27 -08:00
isaacs
e0c600e00e test: Tests for streaming crypto interfaces 2012-12-14 10:52:27 -08:00
isaacs
dd3ebb8cf6 crypto: Streaming interface for Sign and Verify 2012-12-14 10:52:27 -08:00
isaacs
e336134658 crypto: Streaming interface for cipher/decipher/iv 2012-12-14 10:52:27 -08:00
isaacs
175f78c6ba crypto: Streaming api for Hmac 2012-12-14 10:52:27 -08:00
isaacs
90de2ddb77 crypto: Streaming interface for Hash 2012-12-14 10:52:26 -08:00
isaacs
3d3a0b3046 test: Writable stream end() method doesn't take a callback 2012-12-14 10:52:26 -08:00
isaacs
70461c39be test: simple/test-file-write-stream needs to use 0 lowWaterMark 2012-12-14 10:52:26 -08:00
isaacs
79fd9620f5 test: Fix test-repl-autolibs inspect call 2012-12-14 10:52:26 -08:00
isaacs
0e01d6398f zlib: streams2 2012-12-14 10:52:26 -08:00