Re: [flexcoders] Extends vs Implement EventDispatcher
True, but I was under the impression that a virtual method lookup was cheaper than a whole new method call. Not to mention the bytes and bytes of overhead from having to keep another object (the nested EventDispatcher) on the heap ;). I think Michael A. Jackson said it best: "The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet." -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com On Fri, 2008-09-05 at 12:07 -0400, Michael Schmalle wrote: > > In theory, you've got an additional function call, but in practice, > that will not make a difference. > > Do you? I mean he does not have to over head (what little it may be) > of the super classes methods and calls. > > I'm sure this is a trivial answer of it doesn't matter. :) > > Mike > > On Fri, Sep 5, 2008 at 12:04 PM, Maciek Sakrejda > <[EMAIL PROTECTED]> wrote: > Unless Flex is doing something really crazy, that should be > fine. The > only caveat is that, of course, you'll have to implement all > the > IEventDispatcher methods yourself, but you can just pass these > off to a > nested EventDispatcher object. In theory, you've got an > additional > function call, but in practice, that will not make a > difference. > -- > Maciek Sakrejda > Truviso, Inc. > http://www.truviso.com > > > > On Fri, 2008-09-05 at 12:17 +, reflexactions wrote: > > Is there a performance difference between having a class > extend > > EventDispatcher vs implementing IEventDispatcher. > > > > Reason for the question is I have a class which currently > extends > > EventDispatcher and now it needs to extend another class > that is not > > an > > EventDispatcher. This will get properly fixed up in a few > days but > > temporarily the answer is to have it implement > IEventDispatcher but I > > was wondering if it is going to effect performance in any > way ... > > > > tks > > > > > > > > > > > > > > > > -- > Teoti Graphix, LLC > http://www.teotigraphix.com > > Teoti Graphix Blog > http://www.blog.teotigraphix.com > > You can find more by solving the problem then by 'asking the > question'. > >
Re: [flexcoders] Extends vs Implement EventDispatcher
> In theory, you've got an additional function call, but in practice, that will not make a difference. Do you? I mean he does not have to over head (what little it may be) of the super classes methods and calls. I'm sure this is a trivial answer of it doesn't matter. :) Mike On Fri, Sep 5, 2008 at 12:04 PM, Maciek Sakrejda <[EMAIL PROTECTED]>wrote: > Unless Flex is doing something really crazy, that should be fine. The > only caveat is that, of course, you'll have to implement all the > IEventDispatcher methods yourself, but you can just pass these off to a > nested EventDispatcher object. In theory, you've got an additional > function call, but in practice, that will not make a difference. > -- > Maciek Sakrejda > Truviso, Inc. > http://www.truviso.com > > > On Fri, 2008-09-05 at 12:17 +, reflexactions wrote: > > Is there a performance difference between having a class extend > > EventDispatcher vs implementing IEventDispatcher. > > > > Reason for the question is I have a class which currently extends > > EventDispatcher and now it needs to extend another class that is not > > an > > EventDispatcher. This will get properly fixed up in a few days but > > temporarily the answer is to have it implement IEventDispatcher but I > > was wondering if it is going to effect performance in any way ... > > > > tks > > > > > > > > > > > > > -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'.
Re: [flexcoders] Extends vs Implement EventDispatcher
Unless Flex is doing something really crazy, that should be fine. The only caveat is that, of course, you'll have to implement all the IEventDispatcher methods yourself, but you can just pass these off to a nested EventDispatcher object. In theory, you've got an additional function call, but in practice, that will not make a difference. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com On Fri, 2008-09-05 at 12:17 +, reflexactions wrote: > Is there a performance difference between having a class extend > EventDispatcher vs implementing IEventDispatcher. > > Reason for the question is I have a class which currently extends > EventDispatcher and now it needs to extend another class that is not > an > EventDispatcher. This will get properly fixed up in a few days but > temporarily the answer is to have it implement IEventDispatcher but I > was wondering if it is going to effect performance in any way ... > > tks > > > > >
[flexcoders] Extends vs Implement EventDispatcher
Is there a performance difference between having a class extend EventDispatcher vs implementing IEventDispatcher. Reason for the question is I have a class which currently extends EventDispatcher and now it needs to extend another class that is not an EventDispatcher. This will get properly fixed up in a few days but temporarily the answer is to have it implement IEventDispatcher but I was wondering if it is going to effect performance in any way ... tks