In haskell, when dispatching messages (sendAll) through Network.Socket.ByteString concurrently to the same socket from multiple “green” threads, my profiling data indicates a substantial portion of processing time is consumed by the “throwSocketErrorIfMinus1ButRetry” function (44%, as displayed below). Is this primarily due to context switching, or could there be other factors contributing to this observation?
throwSocketErrorIfMinus1ButRetry Network.Socket.Internal NetworkSocketInternal.hs:(172,1)-(187,16) 44.0 0.0
Nick van Gils is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.