Event performance concerns

Put your problem here if it does not fit any of the other categories.

Event performance concerns

Postby EvilTrev » Sun Dec 28, 2008 9:23 pm

Has anyone else noticed that events (touch or ball) seem pretty heavy and slow down their device/inner-loop?

If you have a dev phone and have built API demos I can give you an example of what I mean... run Graphics/OpenGL ES/Kube and watch it spin nicely... now press and hold your finger on the screen, see the slowdown? Spin the trackball at the same time and you can completely destroy performance.

I ask because I have the same issue in my games and have yet managed to beat it.

Trev

Ps. I'm running the dev phone as it arrived, 1.0 firmware, next to nothing on it.
EvilTrev
Freshman
Freshman
 
Posts: 4
Joined: Sun Dec 28, 2008 9:09 pm

Top

Postby EvilTrev » Wed Dec 31, 2008 7:19 pm

Anyone reproduced this? Have ideas?
EvilTrev
Freshman
Freshman
 
Posts: 4
Joined: Sun Dec 28, 2008 9:09 pm

Postby ErnestoGuevara » Wed Jan 14, 2009 4:14 pm

I just tried this out on my own app. While I'm doing constant re-drawing, dragging my finger around does indeed foul up performance - moving from my average 20 fps (I know, I'm working on it) to probably half that or worse.

This adds to a growing list of performance problems I've got. My app takes between 2 and 60 seconds to load (basically at random - no kidding). When I play sounds, every play after the first takes 500-1000ms to actually start playing (and my log messages suggest that it has to wait to get face time with the CPU - something like "Couldn't get buffer - is the CPU pegged?"). And now this.

Very frustrating. I'm sure there's a lot I can do to improve this, but I can't improve how long it takes the touch driver to handle a touch event without going into Android itself.

I did notice, when I was messing with touch, that there were VERY few events coming through with the "touch history" (or whatever it is) filled in, suggesting that the driver may not make enough use the API's ability to aggregate several touch moves into one event.

Che
ErnestoGuevara
Experienced Developer
Experienced Developer
 
Posts: 75
Joined: Thu Jan 08, 2009 2:02 am

Postby EvilTrev » Wed Jan 14, 2009 7:22 pm

I've tried a bunch of different things, including interfacing with events at about the highest level exposed and it still does it... my thoughts have been along the lines that the event system might thrash object creation and garbage collection or starve my activity thread.

Has anyone played around with different game loops that didn't run into this issue?

Trev
EvilTrev
Freshman
Freshman
 
Posts: 4
Joined: Sun Dec 28, 2008 9:09 pm

Postby ErnestoGuevara » Wed Jan 14, 2009 7:58 pm

<<my thoughts have been along the lines that the event system might thrash object creation and garbage collection or starve my activity thread. >>

Have you tried looking at the logcat while this is going on? It spits out a debug message whenever the garbage collector is called and lets you know how many objects were dumped and how long it took.
ErnestoGuevara
Experienced Developer
Experienced Developer
 
Posts: 75
Joined: Thu Jan 08, 2009 2:02 am

Postby ErnestoGuevara » Thu Jan 15, 2009 1:45 am

The thing that gets me is that the pacman app doesn't seem to have this problem - I don't notice any slowdown using touch. It's also starts sounds very quickly when the appropriate trigger occurs. ... wish I could see their source :-x
ErnestoGuevara
Experienced Developer
Experienced Developer
 
Posts: 75
Joined: Thu Jan 08, 2009 2:02 am

Top

Postby cyc380 » Wed Feb 25, 2009 10:24 pm

cyc380
Freshman
Freshman
 
Posts: 5
Joined: Sat Feb 07, 2009 5:40 am

Postby EvilTrev » Wed Feb 25, 2009 11:53 pm



Awesome, that helped a lot.
EvilTrev
Freshman
Freshman
 
Posts: 4
Joined: Sun Dec 28, 2008 9:09 pm

Postby whatever12684 » Sat Mar 07, 2009 4:00 am

EvilTrev wrote:


Awesome, that helped a lot.


Yea thanks, that helped me too.
whatever12684
Freshman
Freshman
 
Posts: 4
Joined: Sun Mar 01, 2009 10:07 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 26 guests