>> Well Object is always THE base class. It may not be known what the
actual base class should be and it is certainly not flexible to always
create a base class just to have a one to satisfy the rule.

>Nor would I suggest that. There are some cases where creating a new class
with properties is going to make sense, there other in where having the
flexibility of Object make sense. You may not be aware there a big
difference between Object and something that extends Object. Objects’s are
dynamic and properties (and methods) can be added at runtime but this comes
at a performance cost. Class that extend Object are not dynamic and you
can’t do this and as a result are faster.

>> Justin - If you have clear performance results then please document them
in the wiki.

>Other people have already researched this and it’s well known AFAIK. For
example here's an old article by Alex [1] where for accessing properties
there’s a 20x performance increase. Obviously there’s a little more to it
than just that but more recent article also have similar results. Object
can be useful but it does come at a performance cost.

I'm not sure if performance concern is a priority here or not, because
although it is important in AVM, it may not be relevant in the browser
where things are untyped in any case. I vaguely recall reading something in
another thread recently that left me with the impression that javascript
output was the priority (for performance, I think) and that the primary
objectives for swf were to achieve compatibility. I think this was in
relation to some view or layout code, but I do wonder if it is a general
'guidance' that would be relevant for things like this. If it is, it would
be good to document that as an explicit piece of guidance (if it is not
already stated somewhere).



On Fri, Jul 7, 2017 at 12:19 PM, Justin Mclean <jus...@classsoftware.com>
wrote:

> Hi,
>
> > That is the concern, but it may be that the developer was making a
> speculative change. If I were cleaning then I would do one of two actions.
> >
> > (a) Review the history of that change and see if the associated comments
> provide a reason.
> > (b) Ask the developer who made the change.
>
> Both are courses of action that I would take assuming the info in the VC
> comments and/or the developer is still about. Sometimes that may not be the
> case.
>
> > Well Object is always THE base class. It may not be known what the
> actual base class should be and it is certainly not flexible to always
> create a base class just to have a one to satisfy the rule.
>
> Nor would I suggest that. There are some cases where creating a new class
> with properties is going to make sense, there other in where having the
> flexibility of Object make sense. You may not be aware there a big
> difference between Object and something that extends Object. Objects’s are
> dynamic and properties (and methods) can be added at runtime but this comes
> at a performance cost. Class that extend Object are not dynamic and you
> can’t do this and as a result are faster.
>
> > Justin - If you have clear performance results then please document them
> in the wiki.
>
> Other people have already researched this and it’s well known AFAIK. For
> example here's an old article by Alex [1] where for accessing properties
> there’s a 20x performance increase. Obviously there’s a little more to it
> than just that but more recent article also have similar results. Object
> can be useful but it does come at a performance cost.
>
> > Thanks. Do you know how to deactivate useless rules?
>
> Yes.
>
> Thanks,
> Justin
>
> 1. http://blogs.adobe.com/aharui/2007/10/actionscript_
> readwrite_perform_1.html

Reply via email to