Tom,

Just a few quick points... you might already know but would be wise to cover
for sake of maintaining history.

Resources are allocated as components/controls/whatnot come into view. Your
observation that your application footprint increased when touching
creationPolicy is what one should expect. The best rule of thumb is to show
what you need... need what you show and wait as long as you possibly can
before showing anything.

With regard to skining. Using a skin in your application will, by its
nature, cause the application footprint to increase. Here Œfootprint¹ being
memory consumption and not necessarily cpu usage. So, an increased footprint
when adding skins into the mix is also something you will probably see.

The part that has me scratching my head is that you are seeing high cpu
usage - which is something that is typically linked to refresh/redraw rates.
How many frame per second are you running at? Have you tried the right click
-> show redraw regions? If the whole app has a red box around it... That is
a good indicator that you are hitting the displaylist / refresh too hard. Do
you have any source we can take a look at?

Cheers,

Rick Winscot


On 5/28/09 9:10 AM, "Tom McNeer" <[email protected]> wrote:

>  
>   
> 
>   
> 
> A couple of days ago, I posted a message regarding extremely high CPU usage in
> an application I was building. Eventually, I concluded that the problem was
> not the Flex app, but some other processes on the same machine.
> 
> However, I have since found out that I was incorrect -- the problem was the
> Flex app after all. So for anyone who read the original post and wondered what
> might be happening -- in particular, Rick Fotis, who attempted to help --
> here's what was going on:
> 
> The issue was caused by the combination of a creationPolicy setting and the
> use of a set of skins called iCandy, from the ScaleNine site. Now -- I'm not
> criticizing the developer of the skins. I don't know enough about what really
> went on. But I do know this: I had set the creationPolicy on a TabNavigator to
> "all." When I removed this, the CPU usage dropped markedly. But when I went
> into one of the tabs, the usage picked back up, although not as much.
> 
> I removed the reference to the skin stylesheet. The CPU usage did what it was
> supposed to do: spike occasionally, then drop to nothing.
> 
> So I can only conclude that the skins were causing continual redraws in the
> background. I've found some blog posts from the folks at EffectiveUI
> discussing performance problems with stateful skins, so I'm not the only one
> who's encountered it. Here's one of the posts:
> http://patrickhansen.com/blog/index.php/2009/03/05/flex-stateful-skins-vs-stat
> eless.
> 
> Moral is: be careful of stateless skins, even though they seem to be
> recommended by Adobe. The use of a large number of skinned components
> (checkboxes, text inputs,  etc.) can evidently be a problem -- and I didn't
> even have that many.
> 
> I don't know enough to make a technical analysis of the issue; but I hope this
> may save someone else a few hours (or in my case, days) of pain.

Reply via email to