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
Oh shoot, that's an excellent question. I was just thinking about wrapping sendfile in the obvious naive way, like we wrap send or whatever, but I forgot that this may cause synchronous disk access. And it's a bit tricky, because we could route it through a thread like we do with other disk access, but in this case that might add enough overhead to defeat the purpose of using sendfile in the first place. It's also unclear whether a thread is really necessary on Windows – maybe TransmitFile does async disk I/o natively?
It would help to have more information. I guess one way forward would be to start by making a toy little benchmark that uses sendfile in the naive way on Linux, and compare it to read+send, to see what benefit we can even hope to get?