Slow moving of a Flash application from background to foreground
I have created a Flash application running in a browser (Firefox 3 on Windows XP). When I move this application from foreground to background and (after some time) viceversa, I notice a considerable slowdown, i.e. for about thirty seconds the application becomes unusable.
My swf is very small (~200 KB), but this swf creates *many* buttons and *many* other graphical widget (with statical images), so the RAM occupied is considerable (~150 MB).
I initially assumed that was caused by the swap mechanism of the operating system or of the browser. This was *not* true, and it was confirmed by the fact that, by default, Mozilla Firefox prevent Windows from swapping out memory when the program is minimized (see config.trim_on_minimize option). Nothing has changed even disabling the paging system of Windows.
Later, I noticed that during the thirty seconds in which the application is unusable, the cpu usage is close to 100%. Weird, right?
The same problem occurs using:
- Microsoft Internet Explorer 6 or Mozilla Firefox 3 on Microsoft Windows XP
- Mozilla Firefox 3 on Linux, or
- Air on Linux and on Windows
so I am reasonably sure is not a problem of the operating system or of the browser.
Do you have any suggestions?
|