Removing receiver from Envelope and switch to use the Mailbox.actor instead, this should speed up the BalancingDispatcher by some since it doesn't entail any allocations in adopting a message

This commit is contained in:
Viktor Klang 2011-10-19 13:19:44 +02:00
parent bde3969f65
commit 0dc3c5ad3d
9 changed files with 21 additions and 38 deletions

View file

@ -78,8 +78,8 @@ class Dispatcher(
protected[akka] val executorServiceFactory = executorServiceFactoryProvider.createExecutorServiceFactory(name)
protected[akka] val executorService = new AtomicReference[ExecutorService](new LazyExecutorServiceWrapper(executorServiceFactory.createExecutorService))
protected[akka] def dispatch(invocation: Envelope) = {
val mbox = invocation.receiver.mailbox
protected[akka] def dispatch(receiver: ActorCell, invocation: Envelope) = {
val mbox = receiver.mailbox
mbox enqueue invocation
registerForExecution(mbox, true, false)
}