Copy link to clipboard
Copied
I’m currently developing an AIR desktop application that will be used in a gallery as an interactive touch screen exhibit, and I’ve encountered a problem with stuttering / oscillating performance that I am currently unable to resolve. I would be grateful if anyone can offer any assistance or advise as to what might be the cause, or where I might look for more information in resolving this issue.
The application allows people to browse through a series of menus and options, and explore, photos, videos and text information. It’s designed at full HD resolution, and uses StageVideo to display a looping video clip as the background of the interface. Some of the menus are presented as carousels that can be rotated in either direction, and the items within the carousel can be selected to display further screens of information. Animation of the carousels and other parts of the interface is done using Greensocks TweenMax, which I’ve successfully used before without problem. When I run the application on the specific computer on which it will be installed, the performance of the carousel rotation and other animated items seems to stutter, or oscillate. The animation doesn’t appear to constantly perform slowly, it’s more that the animation speed seems to alternate between slow, normal, slow, normal, etc, several times a second, giving the impression of a jerky performance. The application framerate is 50fps. I’ve tried reducing it to 30fps, but the performance issue still occurs.
When the application runs it first displays a screensaver. Interrupting the screensaver then displays a carousel menu with 4 options. When rotating the carousel, and the performance problem occurs, Windows task manager says the application is only using around 70MB memory, and CPU usage is minimal.
I’ve run the application on 4 very differently spec’d computers, with differing results. Computer specs as follows:
Computer 1 – My development computer
Computer 2 – My laptop
Computer 3 – My other computer
Computer 4 – Intended installation computer for the application
Computer #1 - The application runs as intended. I have had no problems with the stuttering performance. I’ve run the application on this computer when overclocked at 4.5GHz, and also with the overclocking switched off (running at normal 3.2GHz). The application works fine in both cases.
Computer #2 – The performance varies here. Some of the time the application runs as intended, without any sign of the stuttering performance. However, on some occasions when the application is run, the performance of the animations will stutter. I cannot determine the reason for the variation.
Computer #3 - The application runs as intended, but at a slightly lower framerate, most likely due to the lower spec of this older computer. I have had no problems with the stuttering performance.
Computer #4 – The application has never run as intended. Every time it runs, the performance stutters on this computer.
Flash CC Publish Settings
I’ve started to use Adobe Scout to investigate the problem, and have read through the following article.
http://www.adobe.com/devnet/scout/articles/understanding-flashplayer-with-scout.html
‘Waiting for GPU’ seems to be an issue, from what I can determine in Scout. The above article says…
“Here's a great tip: If your content shows excessive Waiting for GPU time in Scout, try temporarily disabling hardware acceleration in Flash Player (right-click and select Settings). This will cause Flash Player to fall back to software rendering, and the waiting time will vanish, so you can confirm that your problem is GPU-related.”
… I followed the advice above, and the oscillating performance issue was gone on the intended installation computer, but the screen redrawing performance was really bad (due to the CPU rendering the app). I believe this confirms my issue is related to using the GPU. However, upgrading the intended installation computer from it’s onboard Intel card to an Nvidia GTX650 has made no difference.
One option might be to replace the installation computer with a specification that is identical to my developer computer (#1), but I don’t think my client will have the budget for this.
Googling the problem hasn’t provided much help so far, but I’ve seen a few other people mention ‘waiting for GPU’ and ‘synchronization between CPU and GPU’?
Can anyone provide any clues, or a way forward to help me resolve this?
Many thanks
Simon
Copy link to clipboard
Copied
Hi Simon
I am in a similiar situation and would like to know if you resolved your situation.
One FASCINATING thing I have chanced upon is:
if I have chrome browser open in the background, everything is super smooth.
it is as if chrome (32 bit) opened up some mesterious proces that air is able to exploit
strange!!!!
Copy link to clipboard
Copied
Hi rechtut,
What OS are you running on?
My scenario was Windows 7, and I was using the classic display list, rather than Starling. I found that having the Windows Aero Interface enabled helped increase performance of my app. In Windows Control Panel > System > Advanced system settings > Performance > Visual Effects, make sure that 'Enable desktop composition' is checked. Let me know if this helps you or not?
Copy link to clipboard
Copied
Hi Simon
Thanks for the reply. Indeed we are with W7, but with Starling. The settings you mention do not offer any appreciable improvement, but it was very useful to mess around and see what´s what.
I will keep digging and keep you posted. tnx again.
Copy link to clipboard
Copied
Hello,
Have you found a solution for this problem ?
I have a similar issue.
For me, it's on Adobe air and Animate CC, i create a game for android and ios, and i have a random lag while scrolling...just on mobile, on pc there is no problem.
With adobe Scout, this is "waiting for gpu" or "waiting for the next frame" that make the framerate drop.
Like Rechtut with Chrome, i have found that when i run a video recorder app (DU Recorder) at the same time as my game, the LAG disappears...it's just amazing !!
here is my post : Game continued Scrolling LAG Air For Android
Thanks !
Copy link to clipboard
Copied
Hi,
Thank you for reporting the issue.
Have you tried using the tag <
gpuPreference
>(discrete|integrated)</
gpuPreference
> in your application XML? The tag allows you to choose between the integrated or discrete GPU for your AIR application. You can read more about it on GPU Preference Selection in AIR