From c723acc72192334a62bea6ff4baa33aab0da50ad Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 2 Feb 2010 18:40:26 -0800 Subject: [PATCH] Remove some HandleScopes from HTTP for a %2.5 improvement in hello world HTTP score. --- src/node_http.cc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/node_http.cc b/src/node_http.cc index 5971edd10d..9794b90567 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