ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.97 by root, Sat Dec 22 05:48:02 2007 UTC vs.
Revision 1.99 by root, Sat Dec 22 06:16:36 2007 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines