Below is info about an animation problem. I am wonder what other people who are doing fast paced animation are doing to keep them smooth.
Problem: I have been running into a problem of a 300 millisecond pause when running intense animation in my BreakOut clone.
Description: The way I am doing the animation now is basically a loop that calculates where the ball should go in the next frame (takes into account collision with walls, bricks, or paddle) and then changes the coordinate of a div and then updates the div's location to animatesit there. This loop is on timer and runs every 40 ms.
Diagnosis: I believe the problem here is that Garbage Collection is occurring.
Quote:
GCs can trigger small GCs (approx. 16 ms in average) or big GCs (approx. 300 ms, and up). Currently, our webkit configuration forces the system to do a big GC every time it runs; see --gc_global under JavaScript in /etc/palm/browser.conf. That means every GC gives you a 300+ ms hit every time.
Solution: I haven't been able to figure it out. If I lower to the frequency of the animation interval the the pauses occur less I think this article:
http://developer.palm.com/index.php?opt ... le&id=1692 provides some information about my problem but I can't seem to figure out how to solve it.
here is the code (I took out the obviously irrelevant stuff) of my assistant if you can want to take a look:
http://pastebin.com/f5b3e8c16here is the ipk:
http://jmaxkanter.com/org.webosinternal ... 8_all_.ipk
Thanks in advance for any help
-Max