I have a screen where I am using three different types of controls: TextInputs, Comboboxes, and Dates. All controls are highly customized controls with custom skins and stuff.
I have discovered that because of Dates controls the screen is getting slower to open after every run.If I use Flex native DateField controls then I have no problem. I am comparing custom DateDileds with natives ones and basically the difference is skins. I tried to get rid of all custom code but the problem is still there. Any thoughts what can cause this growing time?
Use the profiler to see what is taking longer.
One common mistake in custom drawing code is to not call graphics.clear(). Then on every drawing pass you draw another set of visuals on top of the old ones and the number of total vectors keeps growing.
Well, it kinda looks like some resource or other isn't getting destroyed. It's a question of finding it.
Perhaps you could put a breakpoint before you add new controls, to see if those controls haven't been removed.
Perhaps you have strong event listeners that are preventing the controls being garbage collected.
At this point I am that concerned with specific code that generates the problem but rather suspicious if a memory leak can cause such problem. Even if it is a memory leaks why performance degrades that fast?
If the old ones don't go away, you need to look at the mechanism that would remove them - because it doesn't work.
The other approach would be to cache the controls and re-use them rather than remove and recreate them. It all depends on what it is that you're doing.
Europe, Middle East and Africa