Re: [flexcoders] Help: test EventDispatcher speed please

2007-03-21 Thread Francis Bourre
You sound a bit sarcastic here ;)
Be welcome anyway !

So lemme explain further:
that's not a problem of speed here, that's a problem with mac player.

On mac EventDispatcher.dispatchEvent is 4x slower than my custom  
EventDispatcher.
On Pc EventDispatcher.dispatchEvent is faster than my custom  
EventDispatcher.
It's a bit embarrasing coz I thought EventDispatcher was a native  
class, so how it could execute events dispatch 4x slower than my  
custom class (with statements inside the dispatch process) on mac?
And last but not least, EventDispatcher is the top of the graphical  
hierarchy, so if it runs like 4 or 5X slower on mac, it sounds really  
annoying.

Hope It sounds more clear now.

francis


Le 20 mars 07 à 17:31, Tom Chiverton a écrit :

 On Tuesday 20 Mar 2007, Francis Bourre wrote:
 On Mac, EventDispatcher is slow:
 ...
 On Pc, EventDispatcher is faster.

 So you've discovered that different hardware, on a different O/S,  
 runs the
 same code at different speeds ?
 Wow.

 -- 
 Tom Chiverton
 Helping to continually coordinate attention-grabbing communities
 On: http://thefalken.livejournal.com

 

 This email is sent for and on behalf of Halliwells LLP.

 Halliwells LLP is a limited liability partnership registered in  
 England and Wales under registered number OC307980 whose registered  
 office address is at St James's Court Brown Street Manchester M2  
 2JF.  A list of members is available for inspection at the  
 registered office. Any reference to a partner in relation to  
 Halliwells LLP means a member of Halliwells LLP. Regulated by the  
 Law Society.

 CONFIDENTIALITY

 This email is intended only for the use of the addressee named  
 above and may be confidential or legally privileged.  If you are  
 not the addressee you must not read it and must not use any  
 information contained in nor copy it nor inform any person other  
 than Halliwells LLP or the addressee of its existence or contents.   
 If you have received this email in error please delete it and  
 notify Halliwells LLP IT Department on 0870 365 8008.

 For more information about Halliwells LLP visit www.halliwells.com.



  Yahoo! Groups Sponsor  
 ~--
 Yahoo! Groups gets a make over. See the new email design.
 http://us.click.yahoo.com/hOt0.A/lOaOAA/yQLSAA/nhFolB/TM
  
 ~-

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives: http://www.mail-archive.com/flexcoders% 
 40yahoogroups.com
 Yahoo! Groups Links








Fwd: [flexcoders] Help: test EventDispatcher speed please

2007-03-21 Thread Francis Bourre

You sound a bit sarcastic here ;)
Be welcome anyway !

So lemme explain further:
that's not a problem of speed here, that's a problem with mac player.

On mac EventDispatcher.dispatchEvent is 4x slower than my custom  
EventDispatcher.
On Pc EventDispatcher.dispatchEvent is faster than my custom  
EventDispatcher.
It's a bit embarrasing coz I thought EventDispatcher was a native  
class, so how it could execute events dispatch 4x slower than my  
custom class (with statements inside the dispatch process) on mac?
And last but not least, EventDispatcher is the top of the  
graphical hierarchy, so if it runs like 4 or 5X slower on mac, it  
sounds really annoying.


Hope It sounds more clear now.

francis


Le 20 mars 07 à 17:31, Tom Chiverton a écrit :


On Tuesday 20 Mar 2007, Francis Bourre wrote:

On Mac, EventDispatcher is slow:
...
On Pc, EventDispatcher is faster.


So you've discovered that different hardware, on a different O/S,  
runs the

same code at different speeds ?
Wow.

--
Tom Chiverton
Helping to continually coordinate attention-grabbing communities
On: http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in  
England and Wales under registered number OC307980 whose  
registered office address is at St James's Court Brown Street  
Manchester M2 2JF.  A list of members is available for inspection  
at the registered office. Any reference to a partner in relation  
to Halliwells LLP means a member of Halliwells LLP. Regulated by  
the Law Society.


CONFIDENTIALITY

This email is intended only for the use of the addressee named  
above and may be confidential or legally privileged.  If you are  
not the addressee you must not read it and must not use any  
information contained in nor copy it nor inform any person other  
than Halliwells LLP or the addressee of its existence or  
contents.  If you have received this email in error please delete  
it and notify Halliwells LLP IT Department on 0870 365 8008.


For more information about Halliwells LLP visit www.halliwells.com.



 Yahoo! Groups Sponsor  
~--

Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/hOt0.A/lOaOAA/yQLSAA/nhFolB/TM
 
~-


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/ 
flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders% 
40yahoogroups.com

Yahoo! Groups Links












Re: [flexcoders] Help: test EventDispatcher speed please

2007-03-21 Thread Francis Bourre

hello iiley , sure, you can get it at :
http://www.tweenpix.net/EventBroadcaster.as

I saw your bug report about visible property on your blog few time  
ago, and it sounds like a big problem too.


francis

Le 21 mars 07 à 11:44, iiley a écrit :



Really strange, and annoying, and, maybe i guess the flash player 9  
is still on a early version with strange and buggy things( there is  
some annoying bugs i discoveredhttp://www.rgenerat.org/iileyblog/ ).


I think EventDispatcher is a really native class too so it can have  
very different speed on different platform, Adobe should have ideas  
to improve, or they just don't kown the speed difference so not  
have chance to optimize it yet(Or this is just the real truth)?


Can you post the EventBroadcaster source then we may can get more  
infomation, Francis?


--
iiley
AsWing http://www.aswing.org
Personal http://www.iiley.com






[flexcoders] Help: test EventDispatcher speed please

2007-03-20 Thread Francis Bourre

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;

Re: [flexcoders] OpenAMF, Tomcat and Flex2B3

2006-07-26 Thread Francis Bourre





Hello,

I got exactly the same problem withopenamf + 
jrun+ last flash player ( 
9,0,16,0) and encoding set to amf0.
classmapping fails everytime !

Did anyone succeed to solve it ?

thanks in advance !

francis

  - Original Message - 
  From: 
  Carlos 
  Rovira 
  To: flexcoders@yahoogroups.com 
  Sent: Monday, June 05, 2006 2:55 PM
  Subject: Re: [flexcoders] OpenAMF, Tomcat 
  and Flex2B3
  That's not right, you don't need to use AdvancedGateway to map 
  java-as classes, you can do it as well with DefaultGateway. Although use 
  AdvancedGateway is a best practice, and you must declare your services as in 
  the following example, service 
   
  nameServiceNameToUseInFlash/name 
   
  service-locationcom.carlosrovira.MyClass/service-location 
   invoker-refJava/invoker-ref 
method 

  name*/name  
   parameter  

  type*/type  
   /parameter  
  /method /service Then your must 
  to change your call in flex and put "ServiceNameToUseInFlash" instead the 
  "com.carlosrovira.MyClass". In this way you can change your java class or even 
  the invoker in your openamf-config.xml without modify any flex code.
  On 6/5/06, Andrea 
  Varga [EMAIL PROTECTED] wrote: 
  
  Hi 
Carlos,Yes, I'm using AMF0, I'm using Renaun Erickson's 
RemoteObjectAMF0 class. I have tested it with AMFPHP and it worked, so 
that part should be ok.http://renaun.com/blog/?p=31I 
have read more docs, and I found that for class mappings I should use 
AdvancedGateway instead of DefaultGateway, but I haven't manage to 
writea proper openamf-config.xml 
yet.ThanksAndiCarlos Rovira wrote: Hi 
Andrea, The problem was solved in last beta (FP9 beta3), so 
you can pass VOs  from AS to Java and from Java to 
AS. Your code looks ok, for me but the logs says something 
is happen, maybe...are you using AMF0?, remember that in FP9 default 
is AMF3. On 6/2/06, *Andrea Varga* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] 
wrote: 
Hi I have been trying to set up a 
project using Java, OpenAMF, Tomcat, Flex2B2 
and Cairngorm. I'm kinda new to OpenAMF 
andTomcat (and usually to application 
servers)  and I have found the docs 
confusing. Finally i managed to get the 
remoting working. I can call my services, 
and get back the result, but I am having 
problems with my VO class mappings in both directions (if I send 
 Strings, everything works 
fine) I have read in previous posts, that 
mapping from Java to AS was not working in 
Flash Player 8.5 (but should work from AS to Java), but 
I couldn't find anything about Flash Player 
9.  Actually, I have found this in Carlos 
Rovira's blog: "El problema de mapeo de 
clases de Java hacia ActionScript está resuelto en el 
nuevo *Flash Player 9 Beta"*. 
Unfortunatelly, I don't understand  spanish, 
but it's close to romanian, does that mean 
that the problem has been 
solved in Flash Player 9 or the opposite ? 
:) I have a LoginVO 
class: Java code: 
 --- 
package 
com.spindevelopment.model.vo; public 
class LoginVO { public String 
username; public String 
password; public LoginVO() { 
 } 
} AS 
code: 
- package 
com.spindevelopment.model.vo { 
import org.nevis.cairngorm.vo.ValueObject; 
[RemoteClass(alias=" 
com.spindevelopment.model.vo.LoginVO")] 
[Bindable] public class LoginVO implements 
ValueObject { public var 
username:String; public var 
password:String; 
} } 
In openamf-congid.xml I added this: 
custom-class-mapping 
java-classcom.spindevelopment.model.vo.LoginVO/java-class 
custom-class 
com.spindevelopment.model.vo.LoginVO/custom-class 
/custom-class-mapping In my 
java service class, I have a simple test method, where 
I return a 
String with the 2 properties of LoginVO: 
 public String doLogin(LoginVO 
pLogin ) { return new String("un: " + 
pLogin.username + ", pass: 
"+pLogin.password); 
} The returned string is: "un: null, 
pass: null";  Here is my Tomcat 
log: 02.06.2006 15:54:45 
org.openamf.io.AMFDeserializer init 
INFO: Deserializing Message, for more info turn on debug 
level 02.06.2006 15:54:45 
org.openamf.DefaultGateway service INFO: 
REQUEST: [AMFBody: 
{serviceName=com.spindevelopment.services.Login, 
serviceMethodName=doLogin, response=/1, 
type=ARRAY, value=[ASObject[type= 
com.spindevelopment.model.vo.LoginVO]]}] 
02.06.2006 15:54:46 
org.openamf.invoker.JavaServiceInvoker 
getServiceMethod INFO: topRankedMethod: 
name=doLogin rank=100.0 02.06.2006 15:54:46 
org.openamf.DefaultGateway service INFO: 
RESPONSE: [AMFBody: {serviceName=null, 
serviceMethodName=null, response=null, 
type=UNKNOWN, value=un: null, pass: null}] 
 Could somebody point me in the right 
direction? 
Thanks