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
currently in network.Service.readStream we allocate a buffer to read from the stream that the remote peer opened
however based on recent CPU profiling, the mallocing takes up a LOT of CPU (especially now that we handle the inbound stream properly)
we should use sync.Pool to allocate stream buffers instead, so we malloc a maxPeers number of buffers on node startup and then take/return them to the pool as needed
Task summary
network.Service.readStream
we allocate a buffer to read from the stream that the remote peer openedmalloc
ing takes up a LOT of CPU (especially now that we handle the inbound stream properly)sync.Pool
to allocate stream buffers instead, so wemalloc
amaxPeers
number of buffers on node startup and then take/return them to the pool as neededOther information and links
The text was updated successfully, but these errors were encountered: