=clu replace Set -- with diff and ++ with union
* better performance according to https://docs.google.com/presentation/d/1Qjryxoe-fYEM8ZPhM-98LKfbhnRcn5eAEMNlVVnixsA/pub
This commit is contained in:
parent
9380983d3c
commit
c7c187f6b7
24 changed files with 46 additions and 46 deletions
|
|
@ -195,7 +195,7 @@ class ClusterMessageSerializer(val system: ExtendedActorSystem) extends BaseSeri
|
|||
val allMembers = gossip.members.toVector
|
||||
val allAddresses: Vector[UniqueAddress] = allMembers.map(_.uniqueAddress)
|
||||
val addressMapping = allAddresses.zipWithIndex.toMap
|
||||
val allRoles = allMembers.foldLeft(Set.empty[String])((acc, m) ⇒ acc ++ m.roles).to[Vector]
|
||||
val allRoles = allMembers.foldLeft(Set.empty[String])((acc, m) ⇒ acc union m.roles).to[Vector]
|
||||
val roleMapping = allRoles.zipWithIndex.toMap
|
||||
val allHashes = gossip.version.versions.keys.to[Vector]
|
||||
val hashMapping = allHashes.zipWithIndex.toMap
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue