… | |
… | |
64 | |
64 | |
65 | =head1 DESCRIPTION |
65 | =head1 DESCRIPTION |
66 | |
66 | |
67 | The newest version of this document is also available as an html-formatted |
67 | The newest version of this document is also available as an html-formatted |
68 | web page you might find easier to navigate when reading it for the first |
68 | web page you might find easier to navigate when reading it for the first |
69 | time: L<http://cvs.schmorp.de/libev/ev.html>. |
69 | time: L<http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod>. |
70 | |
70 | |
71 | Libev is an event loop: you register interest in certain events (such as a |
71 | Libev is an event loop: you register interest in certain events (such as a |
72 | file descriptor being readable or a timeout occurring), and it will manage |
72 | file descriptor being readable or a timeout occurring), and it will manage |
73 | these event sources and provide your program with events. |
73 | these event sources and provide your program with events. |
74 | |
74 | |
… | |
… | |
2999 | inotify watch id. The default size is C<16> (or C<1> with C<EV_MINIMAL>), |
2999 | inotify watch id. The default size is C<16> (or C<1> with C<EV_MINIMAL>), |
3000 | usually more than enough. If you need to manage thousands of C<ev_stat> |
3000 | usually more than enough. If you need to manage thousands of C<ev_stat> |
3001 | watchers you might want to increase this value (I<must> be a power of |
3001 | watchers you might want to increase this value (I<must> be a power of |
3002 | two). |
3002 | two). |
3003 | |
3003 | |
|
|
3004 | =item EV_USE_4HEAP |
|
|
3005 | |
|
|
3006 | Heaps are not very cache-efficient. To improve the cache-efficiency of the |
|
|
3007 | timer and periodics heap, libev uses a 4-heap when this symbol is defined |
|
|
3008 | to C<1>. The 4-heap uses more complicated (longer) code but has a |
|
|
3009 | noticable after performance with many (thousands) of watchers. |
|
|
3010 | |
|
|
3011 | The default is C<1> unless C<EV_MINIMAL> is set in which case it is C<0> |
|
|
3012 | (disabled). |
|
|
3013 | |
|
|
3014 | =item EV_HEAP_CACHE_AT |
|
|
3015 | |
|
|
3016 | Heaps are not very cache-efficient. To improve the cache-efficiency of the |
|
|
3017 | timer and periodics heap, libev can cache the timestamp (I<at>) within |
|
|
3018 | the heap structure (selected by defining C<EV_HEAP_CACHE_AT> to C<1>), |
|
|
3019 | which uses 8-12 bytes more per watcher and a few hundred bytes more code, |
|
|
3020 | but avoids random read accesses on heap changes. This noticably improves |
|
|
3021 | performance noticably with with many (hundreds) of watchers. |
|
|
3022 | |
|
|
3023 | The default is C<1> unless C<EV_MINIMAL> is set in which case it is C<0> |
|
|
3024 | (disabled). |
|
|
3025 | |
3004 | =item EV_COMMON |
3026 | =item EV_COMMON |
3005 | |
3027 | |
3006 | By default, all watchers have a C<void *data> member. By redefining |
3028 | By default, all watchers have a C<void *data> member. By redefining |
3007 | this macro to a something else you can include more and other types of |
3029 | this macro to a something else you can include more and other types of |
3008 | members. You have to define it each time you include one of the files, |
3030 | members. You have to define it each time you include one of the files, |