While I don't have any cold hard facts about MXML vs AS performance I'd wager that, all things equal, AS out performs MXML.
As far as my practice, I typically use MXML for layout and do everything else in AS. Coming from a web dev/HTML background I find it very easy to visualize a layout written in MXML and feel that any lost performance (which is probably minimal) allows me increased productivity as a developer. --- In flexcoders@yahoogroups.com, "zaproheeks" <zaprohe...@...> wrote: > > Given two "almost identical" (more on that below) container classes one > implemented in MXML, the other in ActionScript, which one is likely to be > more performant? > > I'm not a Flex expert, but I know that even if MXML "is" ActionScript, there > a number of things that are quite different. For instance, the layout of > components is entirely taken care by MXML while in AS3 we have to do it by > hand. Also binding is much more natural and common in MXML (stuff like > property="{object.value}") while typically (at least in my code) I have no > Bindings in my AS3 classes. > > Another difference is that if some of the contained objects are affected by > runtime conditions, since MXML hides away how the layout is actually > performed, I end up doing adjustments on Creation Complete event, which will > cause new re-render events. If I had implemented the class directly in AS3 I > could have done everything inside createChildren() and maybe it would have > been more performant? > > What's your experience / best practices toward MXML / AS3 containers and > conditional layout? >