0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib
Brendan Ashworth 08133f45c7 http: optimize outgoing requests
This commit does some small optimization changes on
`lib/_http_outgoing.js`. These include switching from `while` loops to
`for` loops, moving away from `util` to `typeof` checks, and removing
dead code. It also includes variable caches to avoid lookups and
generic style changes. All in all, much faster execution.

It gets an across the board increase in req/sec on the benchmarks,
from my experience about a 10% increase.

PR-URL: https://github.com/iojs/io.js/pull/605
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Nicu Micleușanu <micnic90@gmail.com>
Reviewed-By: Christian Vaagland Tellnes <christian@tellnes.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
2015-03-03 21:53:58 -08:00
..
_debug_agent.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
_debugger.js lib: make debug client connect to 127.0.0.1 2015-02-06 16:49:47 +01:00
_http_agent.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
_http_client.js http: emit abort event from ClientRequest 2015-02-25 16:40:31 -05:00
_http_common.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
_http_incoming.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
_http_outgoing.js http: optimize outgoing requests 2015-03-03 21:53:58 -08:00
_http_server.js tracing: add lttng support for tracing on linux 2015-02-09 18:06:57 +01:00
_linklist.js Remove excessive copyright/license boilerplate 2015-01-12 15:30:28 -08:00
_stream_duplex.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
_stream_passthrough.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
_stream_readable.js stream: simpler stream constructon 2015-02-04 20:19:39 -08:00
_stream_transform.js stream: simpler stream constructon 2015-02-04 20:19:39 -08:00
_stream_wrap.js streams: introduce StreamWrap and JSStream 2015-02-24 22:38:21 +03:00
_stream_writable.js stream: simpler stream constructon 2015-02-04 20:19:39 -08:00
_tls_common.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
_tls_legacy.js stream_base: introduce StreamBase 2015-02-22 22:31:57 +03:00
_tls_wrap.js tls: accept empty net.Sockets 2015-03-03 17:05:55 -05:00
assert.js assert: introduce deepStrictEqual 2015-02-09 14:14:20 +03:00
buffer.js buffer: fix pool offset adjustment 2015-02-16 14:09:50 -07:00
child_process.js child_process: add debug and error details 2015-02-05 12:58:15 -05:00
cluster.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
console.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
constants.js Remove excessive copyright/license boilerplate 2015-01-12 15:30:28 -08:00
crypto.js crypto: support passwords in publicEncrypt 2015-02-02 23:21:49 +01:00
dgram.js dgram: check close callback is function 2015-02-02 18:44:05 +01:00
dns.js dns: allow dns.lookup() to return all addresses 2015-02-06 17:18:47 -05:00
domain.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
events.js events: optimize adding and removing of listeners 2015-02-11 23:06:26 +01:00
freelist.js Remove excessive copyright/license boilerplate 2015-01-12 15:30:28 -08:00
fs.js fs: add type checking to makeCallback() 2015-02-21 12:13:43 -05:00
http.js http: replace util._extend() with [].slice() 2015-02-02 14:52:02 -08:00
https.js https: simpler argument check 2015-02-07 12:00:16 -08:00
module.js module: replace NativeModule.require 2015-02-13 13:37:25 -05:00
net.js stream_base: introduce StreamBase 2015-02-22 22:31:57 +03:00
os.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
path.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
process.js src: remove excessive license boilerplate 2015-01-27 16:35:05 +11:00
punycode.js punycode: update to v1.3.2 2014-11-28 13:21:43 +03:00
querystring.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
readline.js readline: use native codePointAt 2015-02-22 20:07:25 -08:00
repl.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
smalloc.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
stream.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
string_decoder.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
sys.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
timers.js net: throw on invalid socket timeouts 2015-02-13 13:37:24 -05:00
tls.js tls: more secure defaults 2015-02-16 12:33:12 +01:00
tty.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
url.js url: reslove urls with . and .. 2015-02-13 14:05:05 -05:00
util.js util: handle symbols properly in format() 2015-02-24 10:14:24 -05:00
v8.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
vm.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
zlib.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00