Results 1 to 6 of 6
  1.    #1  
    I've completed a javaScript arcade style game for the Pre and have a lingering problem. The game pauses every 3-4 seconds for about a half second for no apparent reason. I've run the app in airplane mode but the issue still occurs. The app runs perfectly on the emulator.

    The app timing is controlled by a simple timing interval:

    MainGameAssistant.prototype.StartAnimation = function()
    {
    this.wakeupFunction = this.Animate.bind(this);
    this.controller.window.setTimeout(this.wakeupFunction, SPEED);
    }

    ... and an animation function that runs on a timeout interval.

    MainGameAssistant.prototype.Animate = function()
    {
    // Set timeout for the next interval
    this.controller.window.setTimeout(this.wakeupFunction, SPEED);

    ... JavaScript to animate the game ...

    }

    I've made many optimizations and changes to attempt to reduce what could be GC occurrences but these have had no effect on the problem.

    Why is WebOS stealing my cycles and is there a way to prevent this?

    Is there a different way to reliably drive an animation loop?
  2. #2  
    I'm having the same issue
  3. dbh123's Avatar
    Posts
    65 Posts
    Global Posts
    68 Global Posts
    #3  
    Have you enabled any CPU speed scaling or overclocking? If so remember to undo them - they may cause pauses under some conditions.
  4.    #4  
    That's a good thought, but no. The system is running w/o any adjustments. I've been looking through other threads and there is mention of this issue, but I have not found anything specific.
  5. s219's Avatar
    Posts
    498 Posts
    Global Posts
    1,008 Global Posts
    #5  
    I saw this with earlier revs of the OS, and was hoping a subsequent update would fix it. Alas, it's still an issue to this day.
  6. #6  
    I'm sorry, I'm not a programmer but from my point of view, the Pre is a multitasking phone.

    Doesn't it have to go and check on other tasks every now and then, example: to check to see if you have email.

    Wouldn't that take some time away from your app?

    I know the phone has multitasking but in reality there is only one CPU, it can only perform one instruction at a time.

    Rob
    Robert L
    Astoria Queens, N.Y.C
    - Palm Pre (Sprint) - formally Palm Treo 650
    Version 1.4.1.1
    Sprint Configuration 2.3
    Model: P100EWW
    Hardware Version: A
    Firmware: CC1.4(510)

Tags for this Thread

Posting Permissions