Re: benchmarking various event loops with and without anyevent

2008-04-28 Thread Rocco Caputo
- [EMAIL PROTECTED] Begin forwarded message: From: Rocco Caputo [EMAIL PROTECTED] Date: April 27, 2008 23:29:18 EDT To: Marc Lehmann [EMAIL PROTECTED] Subject: Re: benchmarking various event loops with and without anyevent On Apr 27, 2008, at 01:53, Marc Lehmann wrote: On Sun, Apr 27, 2008

Re: benchmarking various event loops with and without anyevent

2008-04-28 Thread Rocco Caputo
On Apr 28, 2008, at 06:24, Marc Lehmann wrote: [most important points first] In your case, I would create a single persistent POE::Session instance that serviced all the watchers. I would, too, but I cannot find a way to do that with POE: sessions without active watchers will be destroyed,

Re: benchmarking various event loops with and without anyevent

2008-04-28 Thread Rocco Caputo
On Apr 28, 2008, at 03:21, Marc Lehmann wrote: In all fairness, I want to point out that, after _multiple_ rounds of longish e-mail exchanges, Rocco Caputo could not solve the problems that forced AnyEvent to use this design, nor did he enlighten me on how to work around the specific

Re: benchmarking various event loops with and without anyevent

2008-04-26 Thread Marc Lehmann
On Sat, Apr 26, 2008 at 01:14:07AM -0400, Uri Guttman [EMAIL PROTECTED] wrote: ML Maybe I'll provide a backend for stem. actually it makes more sense to me to wrap anyevent in stem. it already of course, using anyevent always makes sense. however, using anyevent doesn't solve the

Re: benchmarking various event loops with and without anyevent

2008-04-26 Thread Marc Lehmann
On Sat, Apr 26, 2008 at 01:14:07AM -0400, Uri Guttman [EMAIL PROTECTED] wrote: ML == Marc Lehmann [EMAIL PROTECTED] writes: ML On Fri, Apr 25, 2008 at 11:40:03PM -0400, Uri Guttman [EMAIL PROTECTED] wrote: check out stem's pure perl event loop. there are examples in the ML Maybe

Re: benchmarking various event loops with and without anyevent

2008-04-26 Thread Marc Lehmann
Hmm, more bugs: sub stopbusywaiting { Stem::Event::stop_loop; } my $stopper = new Stem::Event::Timer object = $dummy, method = stopbusywaiting, delay= 0.05, interval = 0.05; # bug workaround warn a\n; $stopper-start;

Re: benchmarking various event loops with and without anyevent

2008-04-26 Thread Marc Lehmann
On Sat, Apr 26, 2008 at 01:14:07AM -0400, Uri Guttman [EMAIL PROTECTED] wrote: actually it makes more sense to me to wrap anyevent in stem. it already Yes, after it turned out that stopping the loop also seems to clear events it became clear that Stem cannot provide even the stripped down

Re: benchmarking various event loops with and without anyevent

2008-04-26 Thread Uri Guttman
ML == Marc Lehmann [EMAIL PROTECTED] writes: ML The surprising one was the pure perl implementation, which was quite on ML par with C-based event loops such as Event or Glib. I did expect the pure ML perl implementatioon to be at least a factor of three slower than Event or ML Glib.

Re: benchmarking various event loops with and without anyevent

2008-04-26 Thread Rocco Caputo
On Apr 25, 2008, at 22:46, Marc Lehmann wrote: The next release of AnyEvent contains support for a few more backends, notably POE, so AnyEvent is now by definition compatible to POE (before it was only compatible when using an even loop used by POE, such as Event or EV that could be

Re: benchmarking various event loops with and without anyevent

2008-04-26 Thread Marc Lehmann
On Sat, Apr 26, 2008 at 08:13:27AM -0400, Rocco Caputo [EMAIL PROTECTED] wrote: each event watcher. Anyone who knows POE can tell you this is one of the least efficient designs possible. It is the only design that I could get working, even after consulting a few people and implementing some

Re: benchmarking various event loops with and without anyevent

2008-04-25 Thread Marc Lehmann
On Fri, Apr 25, 2008 at 11:40:03PM -0400, Uri Guttman [EMAIL PROTECTED] wrote: check out stem's pure perl event loop. there are examples in the Maybe I'll provide a backend for stem. modules. it does things in a different direction and doesn't scan select's bit masks but instead it scans the

Re: benchmarking various event loops with and without anyevent

2008-04-25 Thread Marc Lehmann
On Sat, Apr 26, 2008 at 06:48:55AM +0200, Marc Lehmann [EMAIL PROTECTED] wrote: Well, can't say thereis much demand for it, but if you cna give me a pointer on these things in the docs I can probably come up with one before the next release: Looking at Stem::Event, which hopefully is the

Re: benchmarking various event loops with and without anyevent

2008-04-25 Thread Marc Lehmann
On Sat, Apr 26, 2008 at 07:01:39AM +0200, Marc Lehmann [EMAIL PROTECTED] wrote: And another one: does Stem deal with subsecond delay values? Under what circumstances? AnyEvent guarantees subsecond accuracy currently. Also: The ’hard’ attribute means that the next interval delay starts