Parallelize Init.addLocal

During akka startup, addLocal was caused twice and prior to this change,
it took roughly 200ms per call on my computer. After this change, it
took about 100ms.
This commit is contained in:
Ethan Atkins 2019-08-21 21:35:38 -07:00
parent 3fc8817974
commit 1700b89ea4
1 changed files with 1 additions and 1 deletions

View File

@ -234,7 +234,7 @@ trait Init[ScopeType] {
if (s.definitive) s :: Nil else ss :+ s
def addLocal(init: Seq[Setting[_]])(implicit scopeLocal: ScopeLocal): Seq[Setting[_]] =
init.flatMap(_.dependencies flatMap scopeLocal) ++ init
init.par.map(_.dependencies flatMap scopeLocal).toVector.flatten ++ init
def delegate(sMap: ScopedMap)(
implicit delegates: ScopeType => Seq[ScopeType],