ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent.pm (file contents):
Revision 1.87 by root, Fri Apr 25 14:07:20 2008 UTC vs.
Revision 1.90 by root, Fri Apr 25 14:24:29 2008 UTC

970interpreter and the backend itself). Nevertheless this shows that it 970interpreter and the backend itself). Nevertheless this shows that it
971adds very little overhead in itself. Like any select-based backend its 971adds very little overhead in itself. Like any select-based backend its
972performance becomes really bad with lots of file descriptors (and few of 972performance becomes really bad with lots of file descriptors (and few of
973them active), of course, but this was not subject of this benchmark. 973them active), of course, but this was not subject of this benchmark.
974 974
975The C<Event> module has a relatively high setup and callback invocation cost, 975The C<Event> module has a relatively high setup and callback invocation
976but overall scores on the third place. 976cost, but overall scores in on the third place.
977 977
978C<Glib>'s memory usage is quite a bit bit higher, but it features a 978C<Glib>'s memory usage is quite a bit higher, but it features a
979faster callback invocation and overall ends up in the same class as 979faster callback invocation and overall ends up in the same class as
980C<Event>. However, Glib scales extremely badly, doubling the number of 980C<Event>. However, Glib scales extremely badly, doubling the number of
981watchers increases the processing time by more than a factor of four, 981watchers increases the processing time by more than a factor of four,
982making it completely unusable when using larger numbers of watchers 982making it completely unusable when using larger numbers of watchers
983(note that only a single file descriptor was used in the benchmark, so 983(note that only a single file descriptor was used in the benchmark, so
1005 1005
1006=head2 Summary 1006=head2 Summary
1007 1007
1008=over 4 1008=over 4
1009 1009
1010=item * Using EV through AnyEvent is faster than any other event loop, but most 1010=item * Using EV through AnyEvent is faster than any other event loop
1011event loops have acceptable performance with or without AnyEvent. 1011(even when used without AnyEvent), but most event loops have acceptable
1012performance with or without AnyEvent.
1012 1013
1013=item * The overhead AnyEvent adds is usually much smaller than the overhead of 1014=item * The overhead AnyEvent adds is usually much smaller than the overhead of
1014the actual event loop, only with extremely fast event loops such as the EV 1015the actual event loop, only with extremely fast event loops such as EV
1015adds AnyEvent significant overhead. 1016adds AnyEvent significant overhead.
1016 1017
1017=item * And you should simply avoid POE like the plague if you want performance or 1018=item * You should avoid POE like the plague if you want performance or
1018reasonable memory usage. 1019reasonable memory usage.
1019 1020
1020=back 1021=back
1021 1022
1022 1023

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines