robust-services-core
robust-services-core copied to clipboard
Speed up MsgPort.FindPeer
It invokes MsgPortPool.FindPeerPort, which searches through all ports. A hash table that maps source addresses to destination addresses is one way to improve this. An entry would be created when a destination address was assigned to receive a source address's initial message. The entry would be deleted when the source address sent a message directly to the destination address. However, this would require a large hash table when a protocol often had a significant delay between an initial message and a subsequent message sent in the same direction.