I'm currently bottlenecked by cork. Probably normal.
One possible improvement I was think of is whether we could change the API so the we don't need to do a slow call back into js, i.e. instead of:
socket.cork(() => {
sendAlotOfData(socket)
})
We could do:
socket.cork()
try {
sendAlotOfData(socket)
} finally {
socket.uncork()
}
Or with modern JS even:
{
using socket.cork()
sendAlotOfData(socket)
}

I'm currently bottlenecked by cork. Probably normal.
One possible improvement I was think of is whether we could change the API so the we don't need to do a slow call back into js, i.e. instead of:
We could do:
Or with modern JS even: