-
Notifications
You must be signed in to change notification settings - Fork 28
Optimize for memory #15
Comments
while we're at it, we should start putting the peerstore on disk |
Also, i think there must be a leak or something in any case. mars is currently using 140MB of memory for just the addressbook. |
Also, the way we store information about peers is using keys of |
It is? From what I can tell, we use |
I think we're talking about different spots. youre talking about addresses and i'm talking about where we store agentVersion, protocolVersion and Protocols |
Ah. My profiles always point to one of the |
Fixed. |
Currently, we use lots of small maps when storing peer routing information. Instead, we should try to optimize for memory and use arrays. We can temporarily use maps as-needed to update this information but we shouldn't keep them around.
We should be able to halve (or more) peerstore memory usage this way. We'd stop storing multiaddrs twice (once as keys, once as values) and we'd lose the overhead of hash-maps (to avoid collisions hash maps are generally sparse).
The text was updated successfully, but these errors were encountered: