Re: WaitLatchOrSocket optimization

2018-03-16 Thread Konstantin Knizhnik
Hi, On 15.03.2018 20:25, Andres Freund wrote: Hi, On 2018-03-15 19:01:40 +0300, Konstantin Knizhnik wrote: Right now function WaitLatchOrSocket is implemented in very inefficient way: for each invocation it creates epoll instance, registers events and then closes this instance. Right, everyth

Re: WaitLatchOrSocket optimization

2018-03-15 Thread Andres Freund
Hi, On 2018-03-15 19:01:40 +0300, Konstantin Knizhnik wrote: > Right now function WaitLatchOrSocket is implemented in very inefficient way: > for each invocation it creates epoll instance, registers events and then > closes this instance. Right, everything performance critical should be migrated

WaitLatchOrSocket optimization

2018-03-15 Thread Konstantin Knizhnik
Hi hackers, Right now function WaitLatchOrSocket is implemented in very inefficient way: for each invocation it creates epoll instance, registers events and then closes this instance. Certainly it is possible to create wait event set once with CreateWaitEventSet and then use WaitEventSetWait.