You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Joe Bowser (JIRA)" <ji...@apache.org> on 2015/12/08 23:58:11 UTC

[jira] [Comment Edited] (CB-10016) pause event doesn't fire when currently executing javascript takes a "long" time

    [ https://issues.apache.org/jira/browse/CB-10016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15047638#comment-15047638 ] 

Joe Bowser edited comment on CB-10016 at 12/8/15 10:58 PM:
-----------------------------------------------------------

This may be directly related to the fact that Javascript runs on the same thread as the renderer, and if you're getting framerate dropping below 35 fps, you're going to have event problems getting things out of the NativeToJS queue.  If you're going to load 1000 items on the canvas and have other performance issues, these will affect the pause event because of how the bridge currently works.

What happens when you use Crosswalk? Same issue?  Better? Worse?


was (Author: bowserj):
This may be directly related to the fact that Javascript runs on the same thread as the renderer, and if you're getting framerate dropping below 35 fps, you're going to have event problems getting things out of the NativeToJS queue.  If you're going to load 1000 items on the canvas and have other performance issues, these will affect the pause event because of how the bridge currently works.

What happens when you use Crosswalk? Same issue?

> pause event doesn't fire when currently executing javascript takes a "long" time
> --------------------------------------------------------------------------------
>
>                 Key: CB-10016
>                 URL: https://issues.apache.org/jira/browse/CB-10016
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 5.3.3
>         Environment: Android Lollipop on Nexus 7
> Android Marshmallow on Nexus 5
>            Reporter: Brian Hearn
>
> By "long" time I mean about 30ms!  When using Cordova to run a html/javascript game the pause event fails to fire in the javascript event listener when the framerate drops below approx 35 fps.  This is simply down to the time it takes to render a number of images to a canvas element.  Above this it fires as expected.
> This issue means I am unable to pause music and timers meaning the game keeps running and music keeps playing when the user navigates away.  
> I can reliably recreate this in a cut down example.  I have posted the code as a question on stackoverflow here :
> http://stackoverflow.com/questions/33463643/cordova-pause-event-on-android-fires-on-resume-when-under-load



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org