FYI I just added some changes to emulation that support the following:

-layout optimization (layout is not being requested as often at startup)
-creationPolicy="none" in Container


*Some layout optimization*
Instead of layout being triggered on a parent by every child as it is added
to its parent at application startup, the layout requests are now deferred
while all the mxml children are being added and then run as a single pass
after that. This has a recursive benefit through the createChildren calls,
and seems to make a reasonable difference in startup overhead by avoiding
the unnecessary layout calls for the case when we know we are (very likely)
adding multiple children in a batch.

*creationPolicy="none"*
I added preliminary support for emulating creationPolicy. At this point
only creationPolicy=none is supported as an alternative to 'all' which is
what we have by default.
I added an example ViewStack launch to the mxroyale ControlsExample. This
adds all its children with creationPolicy=none, except for the first one.
So they are added, but their mxml children don't exist until you switch to
that view, at which point they are created, bindings are executed, etc, etc.
You can see this in the browser DOM if you inspect that example when you
inspect the ViewStack part of the popup window.

Also generally, as with emulation support to date, this change does attempt
to get close to the original Flex lifecycle with the deferred content
creation. There are still differences in that the royale events tend to
fire in a slightly different order when considering parents and children,
but generally the sequence is correct for individual UIComponents.

If anyone is using emulation, please let me know if you see any issues or
log them in github. So far I have tested the above against two large
codebases and it appears stable (and performs a bit better for startup).
The creationPolicy=none support was needed in a case where a lot of
business logic was tied to the events triggered by the instantiation of
deferred content in a client project, so it makes a big difference not
having to rework all that, and makes startup faster as well.

Reply via email to