mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 10:35:50 +00:00
Optimize peer I/O:
- Limit the lifetime of a buffer that was only used in the early phases of peer connection establishment but which lived on as long as the peer was active. - Cache the message used to transfer manifests, so it can be reused instead of recreated for every peer connection. - Improve the reading of partial messages by passing a hint to the I/O layer if the number of bytes needed to complete the message is known.
This commit is contained in:
@@ -431,6 +431,9 @@ ManifestCache::applyManifest(Manifest m)
|
||||
iter->second = std::move(m);
|
||||
}
|
||||
|
||||
// Something has changed. Keep track of it.
|
||||
seq_++;
|
||||
|
||||
return ManifestDisposition::accepted;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user