+1 guess for nr 2 -- Cheers, √ On 29 Jan 2015 09:00, "Roland Kuhn" <[email protected]> wrote:
> Hi Nick, > > I never benchmarked this, but I would guess that the second one should be > a tad faster. Please share your findings! > > Thanks, > > Roland > > 28 jan 2015 kl. 21:37 skrev Nick Ebbitt <[email protected]>: > > I have a scenario where when an actor receives a specific message it must > forward the message to all of it's children that exist at that time. > > I think I have 2 options to solve this. > > getContext().actorSelection("*").forward(message, getContext()); > > or > > getContext().getChildren().forEach(child -> child.forward(message, > getContext())); > > Without fully understanding the internal implementation of actor selection > it's hard to know which will perform better. I plan to perform some bench > marks with the kind of scale I am expecting to require but would appreciate > any insight to this that experienced users may have. > > Thanks > > I've also created a stack overflow question for this if anyone would like > to answer that: > http://stackoverflow.com/questions/28189059/is-forwarding-a-message-to-all-children-via-an-actor-selection-more-efficient-th > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > > > > > *Dr. Roland Kuhn* > *Akka Tech Lead* > Typesafe <http://typesafe.com/> – Reactive apps on the JVM. > twitter: @rolandkuhn > <http://twitter.com/#!/rolandkuhn> > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
