mirror of https://github.com/nodejs/node.git
http: fix performance regression for GET requests
A significant performance regressions has been introduced inpull/23391/head1fddc1f
for GET requests which send data through response.end(). The number of requests per second dropped to somewhere around 6% of their previous level. The fix consists of removing a part of the lines added by1fddc1f
, lines which were supposed to affect only HEAD requests, but interfered with GET requests instead. The lines removed would not have affected the behaviour in the case of a HEAD request as this._hasBody would always be false. Therefore, they were not required to fix the issue reported in #8361. Fixes #8940. PR: #9026 PR-URL: https://github.com/joyent/node/pull/9026 Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
parent
d01a900078
commit
8bcd0a4c4a
|
@ -946,10 +946,6 @@ OutgoingMessage.prototype.end = function(data, encoding) {
|
|||
if (encoding === 'hex' || encoding === 'base64')
|
||||
hot = false;
|
||||
|
||||
// Transfer-encoding: chunked responses to HEAD requests
|
||||
if (this._hasBody && this.chunkedEncoding)
|
||||
hot = false;
|
||||
|
||||
if (hot) {
|
||||
// Hot path. They're doing
|
||||
// res.writeHead();
|
||||
|
|
Loading…
Reference in New Issue