Disabling Bindings on certain Views to avoid unnecessary processing time

Once a view has been created, Bindings will always be active no matter if the view is invisible or removed from Stage.
There might be cases when a View is constantly receiving Binding updates (i.e. connected to an LCDS server with big amount of data transfer or messages). Imagine the view that is processing all the updates is off the screen. Although the most expensive part of the processing in terms of CPU is the UI and it’s not being processed because it’s invisible, We could still say it’s consuming resources unnecessarly.

If you want you can disable or enable selectively the Bindings in an mxml document using the BindingManager:

BindingManager.setEnabled( document, false);

You could enable or disable the bindings according to the visibility of the document.

One Comment to “Disabling Bindings on certain Views to avoid unnecessary processing time”

  1. Pascualin 5 May 2010 at 6:37 pm #

    You could bind the enable property to the visibility of the document :-P


Leave a Reply