[Windows]Periodic sudden stutters in runtime performance
I encountered a problem in AIRSDK 50/51. During runtime, the application experiences sudden freezes/stutters. According to Scout, during these stutters, the DisplayList rendering takes up most of the time, which appears to be the cause of the lag.
However, this issue does not occur when using AIRSDK 33.
The application’s renderMode is set to direct.
Scout recording when using 52.2.2.6
Scout recording when using 33.1.1.926
Can you give some details on the setup of your application or do you have a simple way to replicate this behaviour?
This app is a loader that can load other SWFs and provide additional functions. It is launched by a separate launcher via NativeProcess, and the SWF path to load is passed through startup parameters.
I can' t reproduce this bug with a simple example, but I can provide the complete test build of the program for investigation if necessary.
I found that the launcher's frame rate affects the stutter cycle, even though the only connection between them is a NativeProcess instance and a LocalConnection, which is very strange.
Interesting.
Can you reproduce it running the swf without the loader process?
I tried many different ways to reproduce the issue, including passing startup parameters directly from the command line, and starting the application without any parameters, but none of these methods reproduced the problem.
I also tested launching the target SWF directly as the main application instead of using the loader, but the issue still could not be reproduced.
Right so the issue only presents itself when you use your NativeProcess method to load your swf?
Could you elaborate some more on the method you are using
I use NativeProcess in a normal way and the launcher app shares the same runtime dll with the loader app, only to overwrite the application.xml to let the runtime exe to load different main file(launcher or loader). However, when I extract the specific function to a simple demo, the issue disappear. Here is my code:
and after running a new process, I register an event listener to react to its exit. I know it may sound hard to believe that the stuttering could be attributed to launching the application via NativeProcess, but I really cannot find any other connection between the launcher and the loader app.
Can you elaborate on this part: "only to overwrite the application.xml to let the runtime exe to load different main file(launcher or loader)"
Is path in your code the path to the captive runtime package exe application?
When launching the subprocess, the launcher would modify application descriptor like this:
this will change the app id to avoid instance lock. Then start the exe through NativeProcess. Typically the app id is in this format: SubContainer-ddbd34b187. And the raw content is like this:
Interesting approach I haven't seen this done before.
And to summarise you are seeing this stuttering only when using AIR 50/51 using this particular launch method. Using AIR 50/51 and launching normally doesn't show the stutter ? Have you confirmed the modifications you are making to the application descriptor don't affect anything, ie used the normal launch method with a modified app descriptor?
Hard to understand the difference here.
Yes. the stutter only appears when the loader app is launched by launcher. However, when launching with cmd, or to launch it directly will not encounter this issue(with the same application descriptor).