News for hackers. Stuff that matters.
Re:Windows 10 will come with a command-line package manager by AnthonyMouse on Wednesday October 29, 2014 @01:17PM (#8528454)
This is exactly what I'm talking about. The attitude is that overlapped IO is "better" and screw you if you don't want to redesign your existing software to use it.

First, here's a real example where it isn't better. You have some app which holds a thousand some sockets and receives packets infrequently. With epoll you need one buffer when the odd packet arrives regardless of which socket is ready. With overlapped IO the amount of buffer memory you need is more by a factor of a thousand because each idle socket still requires a buffer to be allocated to it.

But that's not really the point. Having overlapped IO available is fine -- it is better for some applications. The problem is not having epoll, not only because epoll is sometimes better, but because it makes portability unnecessarily difficult. Because in most cases the performance difference between the two is irrelevant and the important criteria is how much work I'm going to have to do to make them both behave the same way on each platform.

Re:Windows 10 will come with a command-line package manager by useerup on Thursday October 30, 2014 @05:01AM (#8531968)
>With overlapped IO the amount of buffer memory you need is more by a factor of a thousand because each idle socket still requires a buffer to be allocated to it.

Use the select function then. Wait for completion of that instead. No need to allocate buffers for sockets that receive messages infrequently.

epoll is a horribly designed API. It should absolutely not be replicated on other platforms.