Skip to main content
Participating Frequently
December 18, 2013
Question

Background worker throttled to 4 fps on Android?

  • December 18, 2013
  • 2 replies
  • 2429 views

I tried to create an multiplayer game as air app with the AIR 4.0 Beta. It runs the client code in the primary worker and the server logic (when started) on a background worker. But it seems like Adobe hasn't planned for that scenario. Seems that on mobile devices the background worker has a fixed framerate of 4 (profiling with scout told me so). So it is handled like in sleepmode of the app. Thats hard for a running server because the eventphase will be delayed in the worst case by 250 ms. Goodbye good latency. Is there a way to change this behaviour or is a Worker designed to be slow reacting?

This topic has been closed for replies.

2 replies

Participant
February 25, 2014

This is a copy of the text i wrote in the bug base:

After all, Android workers are fine for me.


I solve the problem if the 4fps with a workaround:


I made a loop inside the Background Worker that synchronizes with the main Worker with the help of a Mutex and a Condition. This way the Main does a notifyAll() in its processing frame while the Background Worker stays in the corresponding wait() inside the loop.

Every ~250ms I break the loop, allowing the flow to return to the system and process the Worker messages. It inmediately re-enters the loop and stays there for other ~250ms and so on.


I hope it could be useful fot anyone while waiting for Adobe to fix the bug.

Inspiring
December 11, 2017

Hi Adobe,

Is there any chance that this will be fixed in AIR 28 release. It would mean a lot for my game? Please

Participating Frequently
December 20, 2013

Someone from Adobe here who can help with that topic?

Nimisha1
Participating Frequently
December 20, 2013

Hi Dominik,

This issue is know to us, please log a bug for enhancement request @bugbase.adobe.com and mention it back here on forum.

-Nimisha

Participating Frequently
December 20, 2013

Hi Nimisha,

thanks for your answer.

Bug opened: https://bugbase.adobe.com/index.cfm?event=bug&id=3687099

Best

Dominik