Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: runtime/vm/message_handler.cc

Issue 11440035: Optimize the message queue for many active ports with few messages. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge with caching changes. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/message.cc ('k') | runtime/vm/message_handler_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/message_handler.cc
diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc
index 2727eac008468bc0392a31702063088a4bf8bd84..a3e2170486ac6915b5494ed3b7cf8714abd9a662 100644
--- a/runtime/vm/message_handler.cc
+++ b/runtime/vm/message_handler.cc
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "vm/message_handler.h"
+#include "vm/port.h"
#include "vm/dart.h"
namespace dart {
@@ -150,9 +151,7 @@ bool MessageHandler::HandleMessages(bool allow_normal_messages,
monitor_.Exit();
Message::Priority saved_priority = message->priority();
result = HandleMessage(message);
- // ASSERT(Isolate::Current() == NULL);
monitor_.Enter();
-
if (!result) {
// If we hit an error, we're done processing messages.
break;
@@ -238,8 +237,6 @@ void MessageHandler::ClosePort(Dart_Port port) {
"\tport: %"Pd64"\n",
name(), port);
}
- queue_->Flush(port);
- oob_queue_->Flush(port);
}
@@ -250,8 +247,8 @@ void MessageHandler::CloseAllPorts() {
"\thandler: %s\n",
name());
}
- queue_->FlushAll();
- oob_queue_->FlushAll();
+ queue_->Clear();
+ oob_queue_->Clear();
}
« no previous file with comments | « runtime/vm/message.cc ('k') | runtime/vm/message_handler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698