You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
peerFound is called in response to every single DHT query to update our routing table. However, it allocates quite frequently.
We should avoid calling ConvertToStrings every time. Instead, we should cache the string versions of our DHT protocols.
We may want an efficient alternative to ps.SupportsProtocols that doesn't allocate.
Together, these account for 22% of allocations (by number, not size) on a bootstrapper.
Besides that, we also do quite a bit of allocation when actually trying to add peers to the routing table (e.g., we get a list of all peers in the bucket to see if we need to kick any out).
The text was updated successfully, but these errors were encountered:
peerFound
is called in response to every single DHT query to update our routing table. However, it allocates quite frequently.ConvertToStrings
every time. Instead, we should cache the string versions of our DHT protocols.ps.SupportsProtocols
that doesn't allocate.Together, these account for 22% of allocations (by number, not size) on a bootstrapper.
Besides that, we also do quite a bit of allocation when actually trying to add peers to the routing table (e.g., we get a list of all peers in the bucket to see if we need to kick any out).
The text was updated successfully, but these errors were encountered: