Adobe-Runtime-Support icon indicating copy to clipboard operation
Adobe-Runtime-Support copied to clipboard

[Windows]Periodic sudden stutters in runtime performance

Open deuysek opened this issue 1 month ago • 10 comments

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
Image
Scout recording when using 33.1.1.926
Image

deuysek avatar Nov 23 '25 11:11 deuysek

Can you give some details on the setup of your application or do you have a simple way to replicate this behaviour?

marchbold avatar Nov 24 '25 02:11 marchbold

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.

deuysek avatar Nov 24 '25 06:11 deuysek

Interesting.

Can you reproduce it running the swf without the loader process?

marchbold avatar Nov 24 '25 23:11 marchbold

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.

deuysek avatar Nov 25 '25 06:11 deuysek

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

marchbold avatar Nov 26 '25 01:11 marchbold

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:

Image

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.

deuysek avatar Nov 26 '25 17:11 deuysek

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?

marchbold avatar Nov 30 '25 23:11 marchbold

When launching the subprocess, the launcher would modify application descriptor like this:

Image

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:

Image

deuysek avatar Dec 02 '25 03:12 deuysek

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.

marchbold avatar Dec 04 '25 23:12 marchbold

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).

deuysek avatar Dec 07 '25 14:12 deuysek