Re: [Flashcoders] Help: test EventDispatcher speed please
Good analyzing!!! Francis, i think you can change EventBroadcaster to use for(var i in array) to make a new test demo, then, we can test again, if the new result views that EventBroadcaster runs as slow as EventDispatcher on Mac, then, it will be clear? hmmm... 2007/3/22, Brian Williams <[EMAIL PROTECTED]>: Someone already mentioned what it is - the for in loop vs the straight for loop. for (var i in array) ends up pushing all the keys of the array on the stack, and then popping those off. for (var i =0; i< array.length; i++) doesn't. The test attaches 500 listeners to each dispatcher, so when you use the for (var i in array), you're pushing quite a few items on the stack, and it's possible that the mac flash player has slower stack access, or that that particular opcode is significantly slower. Note - the eventdispatcher code uses the for (var i in array) explicitly so that if a listener is removed from the array while dispatching an event that it still dispatches to all listeners. Be careful if you try to just change the loop. Also, why would you have 500 listeners to one broadcaster? The vast majority of the UI code that I've dealt with has 0-2 listeners. The difference between the two might be a lot smaller in that case. --Brian -- iiley AsWing http://www.aswing.org Personal http://www.iiley.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
EventBroadcaster: 5036 EventDispatcher: 16257 mac 9,0,28,0 On 3/22/07, Tilmann Grüll <[EMAIL PROTECTED]> wrote: hi francis, here my result on a DELL dimension AMD64 X2 Dual Core 3800+ 2 GHz, 1 GB RAM: EventBroadcaster: 3563 EventDispatcher: 2210 WIN 9,0,28,0 best, til Francis Bourre schrieb: > Hello list ! > > I noticed something weird about EventDispatcher execution speed in my > mac player. > EventDispatcher.dispatchEvent execution is slow compared to a custom > dispatcher implementation (named EventBroadcaster). > > On Mac, EventDispatcher is slow: > EventBroadcaster: 2925 > EventDispatcher: 12438 > > On Pc, EventDispatcher is faster. > EventBroadcaster: 3908 > EventDispatcher: 3407 > > Can you please report the values you got (displayed on screen) when > you open the url below and the browser you used for testing. > It takes few seconds to initialize (bench with iterations) > > http://www.tweenpix.net/TestEventBroadcaster.swf > > Any clue is welcome. ;) > Thanks in advance guys ! > > francis > > > > Content of the test: > > var tf1 : TextField = new TextField(); > var tf2 : TextField = new TextField(); > var tf3 : TextField = new TextField(); > tf2.y += 30; > tf3.y += 60; > tf1.width = tf2.width = tf3.width = 150; > this.addChild( tf1 ); > this.addChild( tf2 ); > this.addChild( tf3 ); > > var holder : Array = new Array(); > var l1 : Number = 1; > var l2 : Number = 1; > var lNum : Number = 500; > > var eb : EventBroadcaster = new EventBroadcaster ( this ); > var ed : EventDispatcher = new EventDispatcher (); > > while( --lNum -(-1) ) > { > var tg : Object = {foo:function( e : Event ):void{ this.e = > e.type; }}; > ed.addEventListener( "foo", tg.foo ); > eb.addEventListener( "foo", tg ); > holder.push( tg ); > } > > var t : Number = 0; > var e : Event = new Event( "foo" ); > > // > t = getTimer(); > while( --l2 -(-1)) eb.broadcastEvent( e ); > t = getTimer() - t; > trace( "EventBroadcaster: ", t ); > tf1.text = "EventBroadcaster: " + t; > // > t = getTimer(); > while( --l1 -(-1)) ed.dispatchEvent( e ); > t = getTimer() - t; > trace( "EventDispatcher: ", t ); > tf2.text = "EventDispatcher: " + t; > > tf3.text = flash.system.Capabilities.version; > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
Someone already mentioned what it is - the for in loop vs the straight for loop. for (var i in array) ends up pushing all the keys of the array on the stack, and then popping those off. for (var i =0; i< array.length; i++) doesn't. The test attaches 500 listeners to each dispatcher, so when you use the for (var i in array), you're pushing quite a few items on the stack, and it's possible that the mac flash player has slower stack access, or that that particular opcode is significantly slower. Note - the eventdispatcher code uses the for (var i in array) explicitly so that if a listener is removed from the array while dispatching an event that it still dispatches to all listeners. Be careful if you try to just change the loop. Also, why would you have 500 listeners to one broadcaster? The vast majority of the UI code that I've dealt with has 0-2 listeners. The difference between the two might be a lot smaller in that case. --Brian On 3/22/07, Cedric Muller <[EMAIL PROTECTED]> wrote: interestingly, NO single FLASHCODER can say what it is about... meaning, we all lack of understanding of our environnement :P have a nice day all of you who doesn't understand what is going on with the EventDispatcher class ... a true study case this one ... a true! Cedric ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
hi francis, here my result on a DELL dimension AMD64 X2 Dual Core 3800+ 2 GHz, 1 GB RAM: EventBroadcaster: 3563 EventDispatcher: 2210 WIN 9,0,28,0 best, til Francis Bourre schrieb: Hello list ! I noticed something weird about EventDispatcher execution speed in my mac player. EventDispatcher.dispatchEvent execution is slow compared to a custom dispatcher implementation (named EventBroadcaster). On Mac, EventDispatcher is slow: EventBroadcaster: 2925 EventDispatcher: 12438 On Pc, EventDispatcher is faster. EventBroadcaster: 3908 EventDispatcher: 3407 Can you please report the values you got (displayed on screen) when you open the url below and the browser you used for testing. It takes few seconds to initialize (bench with iterations) http://www.tweenpix.net/TestEventBroadcaster.swf Any clue is welcome. ;) Thanks in advance guys ! francis Content of the test: var tf1 : TextField = new TextField(); var tf2 : TextField = new TextField(); var tf3 : TextField = new TextField(); tf2.y += 30; tf3.y += 60; tf1.width = tf2.width = tf3.width = 150; this.addChild( tf1 ); this.addChild( tf2 ); this.addChild( tf3 ); var holder : Array = new Array(); var l1 : Number = 1; var l2 : Number = 1; var lNum : Number = 500; var eb : EventBroadcaster = new EventBroadcaster ( this ); var ed : EventDispatcher = new EventDispatcher (); while( --lNum -(-1) ) { var tg : Object = {foo:function( e : Event ):void{ this.e = e.type; }}; ed.addEventListener( "foo", tg.foo ); eb.addEventListener( "foo", tg ); holder.push( tg ); } var t : Number = 0; var e : Event = new Event( "foo" ); // t = getTimer(); while( --l2 -(-1)) eb.broadcastEvent( e ); t = getTimer() - t; trace( "EventBroadcaster: ", t ); tf1.text = "EventBroadcaster: " + t; // t = getTimer(); while( --l1 -(-1)) ed.dispatchEvent( e ); t = getTimer() - t; trace( "EventDispatcher: ", t ); tf2.text = "EventDispatcher: " + t; tf3.text = flash.system.Capabilities.version; ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
interestingly, NO single FLASHCODER can say what it is about... meaning, we all lack of understanding of our environnement :P have a nice day all of you who doesn't understand what is going on with the EventDispatcher class ... a true study case this one ... a true! Cedric ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Help: test EventDispatcher speed please
Regarding the test, I think it would be more useful to have people specify whether or not they are on an Intel or an original Mac. I have definitely noticed performance improvements since upgrading to my Intel, but I'm not sure if its only because of the faster processor, if the Flash Player handles the code differently on an Intel, or even if its still runs in Rosetta? As far as site checks and requests, I have to agree with Jason on this. If you are compiling testing statistics, requesting to have them sent off list and then posting a summary after you have completed your tests seems more appropriate. I for one would be interested in the results, but again, they aren't very useful for me if I have to filter through all the posts to figure out what the results were. Just my two cents. -DC Holth -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Wednesday, March 21, 2007 11:10 AM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] Help: test EventDispatcher speed please >>I think ppl should be interested by these results mac vs >>pc/linux, don't you think ? :) I know what you're saying but as I see it, it is a site test, "Help: test EventDispatcher speed please". You're askng for a test, sending them to your site. Regardless, I think *maybe* maybe on a summary basis, but not from 20-30 e-mails where half the list sends in their results. Perhaps they can send you their test results offlist and you can compile an post your summary result later. Jason Merrill Bank of America Global Technology & Operations Learning & Leadership Development eTools & Multimedia Team ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com This e-mail and its attachments are intended only for the use of the addressee(s) and may contain privileged, confidential or proprietary information. If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, displaying, copying, or use of this information is strictly prohibited. If you have received this communication in error, please inform the sender immediately and delete and destroy any record of this message. Thank you. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
Part from the fact it got posted to about every single mailing list?? - Original Message - From: "Cedric Muller" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 21, 2007 4:50 PM Subject: Re: [Flashcoders] Help: test EventDispatcher speed please > Hello! > why did you send the etiquette :) > I think testing EventDispatcher performance is something really interesting, > worthy, and flashcoders' centric. > Such post doesn't ask for a site check, nor is the Thread title obscure, a > clear question/request is asked, no solution is > offered, because here Francis is just looking for a benchmark, such post can > be helpful > I know I can be wrong ;) > Cedric > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
Sure, but you posted it to about every mailing list out there. In the end, this won't really solve anything, all you'll get is more of the same.. I suggest you use the bug/wishform and move on. http://www.adobe.com/go/wish/ Muzak - Original Message - From: "Francis Bourre" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 21, 2007 4:14 PM Subject: Re: [Flashcoders] Help: test EventDispatcher speed please hello! As I know, I didn't ask ppl to test an application or a site I made. That's a test that to enlight the fact that EventDispatcher behaves weird on mac player. I think ppl should be interested by these results mac vs pc/linux, don't you think ? :) francis Le 21 mars 07 15:15, Merrill, Jason a crit : ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
Yes, it intereting to get the bug out. Gilles Le 21-mars-07 à 16:14, Francis Bourre a écrit : hello! As I know, I didn't ask ppl to test an application or a site I made. That's a test that to enlight the fact that EventDispatcher behaves weird on mac player. I think ppl should be interested by these results mac vs pc/linux, don't you think ? :) francis Le 21 mars 07 à 15:15, Merrill, Jason a écrit : http://osflash.org/flashcoders/etiquette ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com BERTRAND Gilles B-services sprl 248, rue des canadiens 7022 HYON BELGIUM PHONE +32 499 529229 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
I think most people should be very interested in these results, even if they don't know it yet. On Mar 21, 2007, at 11:14 AM, Francis Bourre wrote: hello! As I know, I didn't ask ppl to test an application or a site I made. That's a test that to enlight the fact that EventDispatcher behaves weird on mac player. I think ppl should be interested by these results mac vs pc/linux, don't you think ? :) francis Le 21 mars 07 à 15:15, Merrill, Jason a écrit : http://osflash.org/flashcoders/etiquette ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Help: test EventDispatcher speed please
>>I think ppl should be interested by these results mac vs >>pc/linux, don't you think ? :) I know what you're saying but as I see it, it is a site test, "Help: test EventDispatcher speed please". You're askng for a test, sending them to your site. Regardless, I think *maybe* maybe on a summary basis, but not from 20-30 e-mails where half the list sends in their results. Perhaps they can send you their test results offlist and you can compile an post your summary result later. Jason Merrill Bank of America Global Technology & Operations Learning & Leadership Development eTools & Multimedia Team ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
Hello! why did you send the etiquette :) I think testing EventDispatcher performance is something really interesting, worthy, and flashcoders' centric. Such post doesn't ask for a site check, nor is the Thread title obscure, a clear question/request is asked, no solution is offered, because here Francis is just looking for a benchmark, such post can be helpful I know I can be wrong ;) Cedric http://osflash.org/flashcoders/etiquette ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
hello! As I know, I didn't ask ppl to test an application or a site I made. That's a test that to enlight the fact that EventDispatcher behaves weird on mac player. I think ppl should be interested by these results mac vs pc/linux, don't you think ? :) francis Le 21 mars 07 à 15:15, Merrill, Jason a écrit : http://osflash.org/flashcoders/etiquette ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Help: test EventDispatcher speed please
http://osflash.org/flashcoders/etiquette ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Help: test EventDispatcher speed please
Ie:7 EventBroadcaster: 3915 EventDispatcher: 2609 WIN 9,0,28,0 FF:2002 EventBroadcaster: 3808 EventDispatcher: 2589 WIN 9,0,28,0 jli -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pedro Taranto Sent: 20 March 2007 19:14 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Help: test EventDispatcher speed please the results in the IE is faster than at FF on my PC: IE: EventBroadcaster: 3906 EventDispatcher: 2615 WIN 9,0,28,0 FF: EventBroadcaster: 4232 EventDispatcher: 3958 WIN 9,0,28,0 sorry but i dont have a mac to compare --Pedro Taranto Francis Bourre escreveu: > Hello list ! > > I noticed something weird about EventDispatcher execution speed in my > mac player. > EventDispatcher.dispatchEvent execution is slow compared to a custom > dispatcher implementation (named EventBroadcaster). > > On Mac, EventDispatcher is slow: > EventBroadcaster: 2925 > EventDispatcher: 12438 > > On Pc, EventDispatcher is faster. > EventBroadcaster: 3908 > EventDispatcher: 3407 > > Can you please report the values you got (displayed on screen) when > you open the url below and the browser you used for testing. > It takes few seconds to initialize (bench with iterations) > > http://www.tweenpix.net/TestEventBroadcaster.swf > > Any clue is welcome. ;) > Thanks in advance guys ! > > francis > > > > Content of the test: > > var tf1 : TextField = new TextField(); > var tf2 : TextField = new TextField(); > var tf3 : TextField = new TextField(); > tf2.y += 30; > tf3.y += 60; > tf1.width = tf2.width = tf3.width = 150; > this.addChild( tf1 ); > this.addChild( tf2 ); > this.addChild( tf3 ); > > var holder : Array = new Array(); > var l1 : Number = 1; > var l2 : Number = 1; > var lNum : Number = 500; > > var eb : EventBroadcaster = new EventBroadcaster ( this ); > var ed : EventDispatcher = new EventDispatcher (); > > while( --lNum -(-1) ) > { > var tg : Object = {foo:function( e : Event ):void{ this.e = > e.type; }}; > ed.addEventListener( "foo", tg.foo ); > eb.addEventListener( "foo", tg ); > holder.push( tg ); > } > > var t : Number = 0; > var e : Event = new Event( "foo" ); > > // > t = getTimer(); > while( --l2 -(-1)) eb.broadcastEvent( e ); > t = getTimer() - t; > trace( "EventBroadcaster: ", t ); > tf1.text = "EventBroadcaster: " + t; > // > t = getTimer(); > while( --l1 -(-1)) ed.dispatchEvent( e ); > t = getTimer() - t; > trace( "EventDispatcher: ", t ); > tf2.text = "EventDispatcher: " + t; > > tf3.text = flash.system.Capabilities.version; > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
Definitely slower on a Mac FF : EventBroadcaster: 5021 EventDispatcher: 16148 Safari : EventBroadcaster: 5845 EventDispatcher: 17080 Opera 8.5: EventBroadcaster: 5469 EventDispatcher: 17635 Player MAC, 9,0,28,0 no clue as to why tho ... Good luck ! Francis Bourre wrote: Hello list ! I noticed something weird about EventDispatcher execution speed in my mac player. EventDispatcher.dispatchEvent execution is slow compared to a custom dispatcher implementation (named EventBroadcaster). On Mac, EventDispatcher is slow: EventBroadcaster: 2925 EventDispatcher: 12438 On Pc, EventDispatcher is faster. EventBroadcaster: 3908 EventDispatcher: 3407 Can you please report the values you got (displayed on screen) when you open the url below and the browser you used for testing. It takes few seconds to initialize (bench with iterations) http://www.tweenpix.net/TestEventBroadcaster.swf Any clue is welcome. ;) Thanks in advance guys ! francis Content of the test: var tf1 : TextField = new TextField(); var tf2 : TextField = new TextField(); var tf3 : TextField = new TextField(); tf2.y += 30; tf3.y += 60; tf1.width = tf2.width = tf3.width = 150; this.addChild( tf1 ); this.addChild( tf2 ); this.addChild( tf3 ); var holder : Array = new Array(); var l1 : Number = 1; var l2 : Number = 1; var lNum : Number = 500; var eb : EventBroadcaster = new EventBroadcaster ( this ); var ed : EventDispatcher = new EventDispatcher (); while( --lNum -(-1) ) { var tg : Object = {foo:function( e : Event ):void{ this.e = e.type; }}; ed.addEventListener( "foo", tg.foo ); eb.addEventListener( "foo", tg ); holder.push( tg ); } var t : Number = 0; var e : Event = new Event( "foo" ); // t = getTimer(); while( --l2 -(-1)) eb.broadcastEvent( e ); t = getTimer() - t; trace( "EventBroadcaster: ", t ); tf1.text = "EventBroadcaster: " + t; // t = getTimer(); while( --l1 -(-1)) ed.dispatchEvent( e ); t = getTimer() - t; trace( "EventDispatcher: ", t ); tf2.text = "EventDispatcher: " + t; tf3.text = flash.system.Capabilities.version; ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
EventBroadcaster: 3924 EventDispatcher: 2676 WIN/ FF / flash 9 Francis Bourre wrote: Hello list ! I noticed something weird about EventDispatcher execution speed in my mac player. EventDispatcher.dispatchEvent execution is slow compared to a custom dispatcher implementation (named EventBroadcaster). On Mac, EventDispatcher is slow: EventBroadcaster: 2925 EventDispatcher: 12438 On Pc, EventDispatcher is faster. EventBroadcaster: 3908 EventDispatcher: 3407 Can you please report the values you got (displayed on screen) when you open the url below and the browser you used for testing. It takes few seconds to initialize (bench with iterations) http://www.tweenpix.net/TestEventBroadcaster.swf Any clue is welcome. ;) Thanks in advance guys ! francis Content of the test: var tf1 : TextField = new TextField(); var tf2 : TextField = new TextField(); var tf3 : TextField = new TextField(); tf2.y += 30; tf3.y += 60; tf1.width = tf2.width = tf3.width = 150; this.addChild( tf1 ); this.addChild( tf2 ); this.addChild( tf3 ); var holder : Array = new Array(); var l1 : Number = 1; var l2 : Number = 1; var lNum : Number = 500; var eb : EventBroadcaster = new EventBroadcaster ( this ); var ed : EventDispatcher = new EventDispatcher (); while( --lNum -(-1) ) { var tg : Object = {foo:function( e : Event ):void{ this.e = e.type; }}; ed.addEventListener( "foo", tg.foo ); eb.addEventListener( "foo", tg ); holder.push( tg ); } var t : Number = 0; var e : Event = new Event( "foo" ); // t = getTimer(); while( --l2 -(-1)) eb.broadcastEvent( e ); t = getTimer() - t; trace( "EventBroadcaster: ", t ); tf1.text = "EventBroadcaster: " + t; // t = getTimer(); while( --l1 -(-1)) ed.dispatchEvent( e ); t = getTimer() - t; trace( "EventDispatcher: ", t ); tf2.text = "EventDispatcher: " + t; tf3.text = flash.system.Capabilities.version; ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
the results in the IE is faster than at FF on my PC: IE: EventBroadcaster: 3906 EventDispatcher: 2615 WIN 9,0,28,0 FF: EventBroadcaster: 4232 EventDispatcher: 3958 WIN 9,0,28,0 sorry but i dont have a mac to compare --Pedro Taranto Francis Bourre escreveu: Hello list ! I noticed something weird about EventDispatcher execution speed in my mac player. EventDispatcher.dispatchEvent execution is slow compared to a custom dispatcher implementation (named EventBroadcaster). On Mac, EventDispatcher is slow: EventBroadcaster: 2925 EventDispatcher: 12438 On Pc, EventDispatcher is faster. EventBroadcaster: 3908 EventDispatcher: 3407 Can you please report the values you got (displayed on screen) when you open the url below and the browser you used for testing. It takes few seconds to initialize (bench with iterations) http://www.tweenpix.net/TestEventBroadcaster.swf Any clue is welcome. ;) Thanks in advance guys ! francis Content of the test: var tf1 : TextField = new TextField(); var tf2 : TextField = new TextField(); var tf3 : TextField = new TextField(); tf2.y += 30; tf3.y += 60; tf1.width = tf2.width = tf3.width = 150; this.addChild( tf1 ); this.addChild( tf2 ); this.addChild( tf3 ); var holder : Array = new Array(); var l1 : Number = 1; var l2 : Number = 1; var lNum : Number = 500; var eb : EventBroadcaster = new EventBroadcaster ( this ); var ed : EventDispatcher = new EventDispatcher (); while( --lNum -(-1) ) { var tg : Object = {foo:function( e : Event ):void{ this.e = e.type; }}; ed.addEventListener( "foo", tg.foo ); eb.addEventListener( "foo", tg ); holder.push( tg ); } var t : Number = 0; var e : Event = new Event( "foo" ); // t = getTimer(); while( --l2 -(-1)) eb.broadcastEvent( e ); t = getTimer() - t; trace( "EventBroadcaster: ", t ); tf1.text = "EventBroadcaster: " + t; // t = getTimer(); while( --l1 -(-1)) ed.dispatchEvent( e ); t = getTimer() - t; trace( "EventDispatcher: ", t ); tf2.text = "EventDispatcher: " + t; tf3.text = flash.system.Capabilities.version; ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Help: test EventDispatcher speed please
EventBroadcaster: 2875 EventDispatcher: 2294 WIN 9,0,28,0 Francis Bourre wrote: Hello list ! I noticed something weird about EventDispatcher execution speed in my mac player. EventDispatcher.dispatchEvent execution is slow compared to a custom dispatcher implementation (named EventBroadcaster). On Mac, EventDispatcher is slow: EventBroadcaster: 2925 EventDispatcher: 12438 On Pc, EventDispatcher is faster. EventBroadcaster: 3908 EventDispatcher: 3407 Can you please report the values you got (displayed on screen) when you open the url below and the browser you used for testing. It takes few seconds to initialize (bench with iterations) http://www.tweenpix.net/TestEventBroadcaster.swf Any clue is welcome. ;) Thanks in advance guys ! francis Content of the test: var tf1 : TextField = new TextField(); var tf2 : TextField = new TextField(); var tf3 : TextField = new TextField(); tf2.y += 30; tf3.y += 60; tf1.width = tf2.width = tf3.width = 150; this.addChild( tf1 ); this.addChild( tf2 ); this.addChild( tf3 ); var holder : Array = new Array(); var l1 : Number = 1; var l2 : Number = 1; var lNum : Number = 500; var eb : EventBroadcaster = new EventBroadcaster ( this ); var ed : EventDispatcher = new EventDispatcher (); while( --lNum -(-1) ) { var tg : Object = {foo:function( e : Event ):void{ this.e = e.type; }}; ed.addEventListener( "foo", tg.foo ); eb.addEventListener( "foo", tg ); holder.push( tg ); } var t : Number = 0; var e : Event = new Event( "foo" ); // t = getTimer(); while( --l2 -(-1)) eb.broadcastEvent( e ); t = getTimer() - t; trace( "EventBroadcaster: ", t ); tf1.text = "EventBroadcaster: " + t; // t = getTimer(); while( --l1 -(-1)) ed.dispatchEvent( e ); t = getTimer() - t; trace( "EventDispatcher: ", t ); tf2.text = "EventDispatcher: " + t; tf3.text = flash.system.Capabilities.version; ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Help: test EventDispatcher speed please
Hello list ! I noticed something weird about EventDispatcher execution speed in my mac player. EventDispatcher.dispatchEvent execution is slow compared to a custom dispatcher implementation (named EventBroadcaster). On Mac, EventDispatcher is slow: EventBroadcaster: 2925 EventDispatcher: 12438 On Pc, EventDispatcher is faster. EventBroadcaster: 3908 EventDispatcher: 3407 Can you please report the values you got (displayed on screen) when you open the url below and the browser you used for testing. It takes few seconds to initialize (bench with iterations) http://www.tweenpix.net/TestEventBroadcaster.swf Any clue is welcome. ;) Thanks in advance guys ! francis Content of the test: var tf1 : TextField = new TextField(); var tf2 : TextField = new TextField(); var tf3 : TextField = new TextField(); tf2.y += 30; tf3.y += 60; tf1.width = tf2.width = tf3.width = 150; this.addChild( tf1 ); this.addChild( tf2 ); this.addChild( tf3 ); var holder : Array = new Array(); var l1 : Number = 1; var l2 : Number = 1; var lNum : Number = 500; var eb : EventBroadcaster = new EventBroadcaster ( this ); var ed : EventDispatcher = new EventDispatcher (); while( --lNum -(-1) ) { var tg : Object = {foo:function( e : Event ):void{ this.e = e.type; }}; ed.addEventListener( "foo", tg.foo ); eb.addEventListener( "foo", tg ); holder.push( tg ); } var t : Number = 0; var e : Event = new Event( "foo" ); // t = getTimer(); while( --l2 -(-1)) eb.broadcastEvent( e ); t = getTimer() - t; trace( "EventBroadcaster: ", t ); tf1.text = "EventBroadcaster: " + t; // t = getTimer(); while( --l1 -(-1)) ed.dispatchEvent( e ); t = getTimer() - t; trace( "EventDispatcher: ", t ); tf2.text = "EventDispatcher: " + t; tf3.text = flash.system.Capabilities.version; ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com