Skip to main content
Inspiring
October 17, 2011
Question

anyone notice new lag on repeated touch events in Air3?

  • October 17, 2011
  • 7 replies
  • 1049 views

I'm finding a bit of lag with touch events on my droidX. I did not have this lag in earllier builds of Air.

Its not too bad for normal use, but if you tap repeatedly you definitely see the frame rate drop quite a bit.

Unfortunitly in one area of the game, you may want to punch someone in the face repeatedly... hence the discovery.

I just used my friends DroidX2 (powerful phone), I could not cause lag on that.

This topic has been closed for replies.

7 replies

November 1, 2011

I have all my listeners attached to the stage...  I'll see what happens if I attach them to my main bitmap tonight.

November 2, 2011

Like boat5 said I had problems with my app when I had my touch object as button class but when I switched it to a movie clip that solved all the lag problems.

Also consider setting your stage quality to LOW that might help.

November 1, 2011

Ah, ok... well then this sure confuses me even more!

What on earth am I doing differently than everyone else?!  Haha! (seems like a problem a LOT more people would be having)

But I turned off the rendering in my app, it was running at 60fps, still massive TOUCH_BEGIN lag.

Thanks though!

boat5Author
Inspiring
November 1, 2011

so perhaps there is a problem then. In post 2 i mentioned lag at 60 fps... this is still true. Its just that i dont usually render at 60fps, so i don't know if its a new issue or not. My origial issue was rendering at 30 fps, and at 30 i dont see any issues.

what are you touching? I am touching a movieClip, in the past I had issues with button symbols causing massive lag, I have not tested that in a while though.

boat5Author
Inspiring
November 1, 2011

Hi C Laser,

I think we might be seeing different issues.

I have no delay on the touch event itself... I was seeing FPS drop in the app on droidX only with rapid taps of TOUCH_BEGIN, but the touch function fires instantly both droidX and droid2...It just seemed to lag the app rendering as a whole.

However! ... It turned out to be a rendering error on my part. I had then setup the 60 fps "test" scenario listed in post 2 which is still valid, but running at my normal 30 fps, there is actually no touch issues on droidX or droid2 rendering GPU mode / Air3.

fyi, droidX other bug:

https://bugbase.adobe.com/index.cfm?event=bug&id=2993046

boat5Author
Inspiring
October 21, 2011

Hi Everyone,

Now my question is : how much lag is too much?

scenerio:

DroidX (original) in GPU mode.

test app is only:

2 MovieClips as buttons

TOUCH_BEGIN Listener

Mr Doobs stats class for FPS:

stage.framerate set to 60

FPS maxs out around 45 fps (as it always has in GPU mode on this device)

as you press the buttons quickly, the fps drops to 38-40 ... stop pressing = back to 45 fps

(the event handler has no code in it, its purly the touch event causing the lag).

Back in earlier builds, there were reports of touch event lag... I never saw it on my device, so this seems to be new to Air3, or perhaps one of the later 2.7 runtime updates.

I know 2.6 did not, and i think the first release of 2.7 did not have this issue.

I dont know, it is expected to have NO lag from a touch right?

November 1, 2011

I'm having this same problem and I just can't do anything to fix it!

Before I updated  to AIR 3 my app ran perfectly with absolutely no lag on the touch events, now there's a 300-500 millisecond lag before the TOUCH_BEGIN event fires!  I don't see how this could have happened!  (also using a Droid X, same problem on my friend's X2)

The worst part is, if I render out to a regular swf and load it in my phones browser it works perfectly!