Alex, first, thanks for that memory breakdown, very helpful.

> The issue was not in the cost of the
> allocations, it was in the cost of an additional function call to run the
> actual work.  Everything is now being proxied.


What if when setting the composited piece you always stored a hard
reference to all the functions, so something like this:

private var setFocusFunction:Function;
public function set focusBehavior(value:IFocusBehavior):void {

this.setFocusFunction = value.setFocus; //where setFocus() is a function

}

and then when needing to set the focus, UIComponent calls
this.setFocusFunction() instead of calling focusBehavior.setFocus()

Since now the function is stored in UIComponent, does that get around the
perf. problem of always calling a proxy like focusBehavior.setFocus()?

Reply via email to