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.72 by root, Fri Apr 25 07:43:25 2008 UTC vs.
Revision 1.73 by root, Fri Apr 25 07:47:12 2008 UTC

935but this was not subjetc of this benchmark. 935but this was not subjetc of this benchmark.
936 936
937The C<Event> module has a relatively high setup and callback invocation cost, 937The C<Event> module has a relatively high setup and callback invocation cost,
938but overall scores on the third place. 938but overall scores on the third place.
939 939
940C<Glib>'s memory usage is quite a bit bit higher, features a faster 940C<Glib>'s memory usage is quite a bit bit higher, but it features a
941callback invocation and overall lands in the same class as C<Event>. 941faster callback invocation and overall ends up in the same class as
942C<Event>. However, Glib scales extremely badly, doubling the number of
943watchers increases the processing time by more than a factor of four,
944making it completely unusable when using larger numbers of watchers
945(note that only a single file descriptor was used in the benchmark, so
946inefficiencies of C<poll> do not account for this).
942 947
943The C<Tk> adaptor works relatively well, the fact that it crashes with 948The C<Tk> adaptor works relatively well. The fact that it crashes with
944more than 2000 watchers is a big setback, however, as correctness takes 949more than 2000 watchers is a big setback, however, as correctness takes
945precedence over speed. Nevertheless, its performance is surprising, as the 950precedence over speed. Nevertheless, its performance is surprising, as the
946file descriptor is dup()ed for each watcher. This shows that the dup() 951file descriptor is dup()ed for each watcher. This shows that the dup()
947employed by some adaptors is not a big performance issue (it does incur a 952employed by some adaptors is not a big performance issue (it does incur a
948hidden memory cost inside the kernel, though). 953hidden memory cost inside the kernel, though).
962Using EV through AnyEvent is faster than any other event loop, but most 967Using EV through AnyEvent is faster than any other event loop, but most
963event loops have acceptable performance with or without AnyEvent. 968event loops have acceptable performance with or without AnyEvent.
964 969
965The overhead AnyEvent adds is usually much smaller than the overhead of 970The overhead AnyEvent adds is usually much smaller than the overhead of
966the actual event loop, only with extremely fast event loops such as the EV 971the actual event loop, only with extremely fast event loops such as the EV
967adds Anyevent significant overhead. 972adds AnyEvent significant overhead.
968 973
969And you should simply avoid POE like the plague if you want performance or 974And you should simply avoid POE like the plague if you want performance or
970reasonable memory usage. 975reasonable memory usage.
971 976
972 977

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines