… | |
… | |
596 | overhead for the actual polling but can deliver many events at once. |
596 | overhead for the actual polling but can deliver many events at once. |
597 | |
597 | |
598 | By setting a higher I<io collect interval> you allow libev to spend more |
598 | By setting a higher I<io collect interval> you allow libev to spend more |
599 | time collecting I/O events, so you can handle more events per iteration, |
599 | time collecting I/O events, so you can handle more events per iteration, |
600 | at the cost of increasing latency. Timeouts (both C<ev_periodic> and |
600 | at the cost of increasing latency. Timeouts (both C<ev_periodic> and |
601 | C<ev_timer>) will be not affected. |
601 | C<ev_timer>) will be not affected. Setting this to a non-null bvalue will |
|
|
602 | introduce an additional C<ev_sleep ()> call into most loop iterations. |
602 | |
603 | |
603 | Likewise, by setting a higher I<timeout collect interval> you allow libev |
604 | Likewise, by setting a higher I<timeout collect interval> you allow libev |
604 | to spend more time collecting timeouts, at the expense of increased |
605 | to spend more time collecting timeouts, at the expense of increased |
605 | latency (the watcher callback will be called later). C<ev_io> watchers |
606 | latency (the watcher callback will be called later). C<ev_io> watchers |
606 | will not be affected. |
607 | will not be affected. Setting this to a non-null value will not introduce |
|
|
608 | any overhead in libev. |
607 | |
609 | |
608 | Many (busy) programs can usually benefit by setting the io collect |
610 | Many (busy) programs can usually benefit by setting the io collect |
609 | interval to a value near C<0.1> or so, which is often enough for |
611 | interval to a value near C<0.1> or so, which is often enough for |
610 | interactive servers (of course not for games), likewise for timeouts. It |
612 | interactive servers (of course not for games), likewise for timeouts. It |
611 | usually doesn't make much sense to set it to a lower value than C<0.01>, |
613 | usually doesn't make much sense to set it to a lower value than C<0.01>, |