Control Accessor overhead

Hi,

Does anyone know what is the overhead of a Control Accessor call?

I have done some profiling and noticed that in can take up to 150 milliseconds, whereas a normal getter call takes under 1 millisecond.

This makes me now think twice before generating and using a Control Accessor.

br,
Vlad

I guess that depends on how large your component tree is and where the control is in the component tree. The control getter uses a method that does a depth first search to find the control with the matching id. If the performance is a problem, you can probably make the lookup a bit faster by supplying an absolute control id (starts with a colon and all naming container segments are required). If an absolute id is supplied no search is needed.

For example:


findComponentInRoot(":defaultForm:myNamingContainer:inputControl1");

instead of:


findComponentInRoot("inputControl1");

Hi Eric,

Thank you for the reply.

Normally I generate the getter from the view Source > Create Control Accessor, but I will keep an eye on short id searches.

br,
Vlad