From: Ryan Dahl Date: Wed, 3 Feb 2010 02:40:26 +0000 (-0800) Subject: Remove some HandleScopes from HTTP X-Git-Tag: v0.1.27~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c723acc72192334a62bea6ff4baa33aab0da50ad;p=platform%2Fupstream%2Fnodejs.git Remove some HandleScopes from HTTP for a %2.5 improvement in hello world HTTP score. --- diff --git a/src/node_http.cc b/src/node_http.cc index 5971edd..9794b90 100644 --- a/src/node_http.cc +++ b/src/node_http.cc @@ -129,8 +129,6 @@ HTTPConnection::OnEOF () int HTTPConnection::on_message_begin (http_parser *parser) { - HandleScope scope; - if (message_begin_symbol.IsEmpty()) { method_symbol = NODE_PSYMBOL("method"); status_code_symbol = NODE_PSYMBOL("statusCode"); @@ -186,7 +184,6 @@ HTTPConnection::on_message_complete (http_parser *parser) int HTTPConnection::on_url (http_parser *parser, const char *buf, size_t len) { - HandleScope scope; HTTPConnection *connection = static_cast(parser->data); assert(connection->refs_); Local argv[1] = { String::New(buf, len) }; @@ -197,7 +194,6 @@ HTTPConnection::on_url (http_parser *parser, const char *buf, size_t len) int HTTPConnection::on_query_string (http_parser *parser, const char *buf, size_t len) { - HandleScope scope; HTTPConnection *connection = static_cast(parser->data); assert(connection->refs_); Local argv[1] = { String::New(buf, len) }; @@ -208,7 +204,6 @@ HTTPConnection::on_query_string (http_parser *parser, const char *buf, size_t le int HTTPConnection::on_path (http_parser *parser, const char *buf, size_t len) { - HandleScope scope; HTTPConnection *connection = static_cast(parser->data); assert(connection->refs_); Local argv[1] = { String::New(buf, len) }; @@ -219,7 +214,6 @@ HTTPConnection::on_path (http_parser *parser, const char *buf, size_t len) int HTTPConnection::on_fragment (http_parser *parser, const char *buf, size_t len) { - HandleScope scope; HTTPConnection *connection = static_cast(parser->data); assert(connection->refs_); Local argv[1] = { String::New(buf, len) }; @@ -240,7 +234,6 @@ const static char normalizer[] = int HTTPConnection::on_header_field (http_parser *parser, const char *buf, size_t len) { - HandleScope scope; HTTPConnection *connection = static_cast(parser->data); assert(connection->refs_); @@ -257,7 +250,6 @@ HTTPConnection::on_header_field (http_parser *parser, const char *buf, size_t le int HTTPConnection::on_header_value (http_parser *parser, const char *buf, size_t len) { - HandleScope scope; HTTPConnection *connection = static_cast(parser->data); assert(connection->refs_); @@ -293,7 +285,6 @@ HTTPConnection::on_headers_complete (http_parser *parser) { HTTPConnection *connection = static_cast (parser->data); assert(connection->refs_); - HandleScope scope; Local message_info = Object::New(); @@ -339,7 +330,6 @@ HTTPConnection::on_body (http_parser *parser, const char *buf, size_t len) HTTPConnection *connection = static_cast (parser->data); assert(connection->refs_); - HandleScope scope; // TODO each message should have their encoding. // don't look at the conneciton for encoding