-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C3 runtime] Instant Games not correctly handling suspend/resume #2403
Comments
It sounds like the page visibility events are broken. The runtime should suspend on minimize and resume on restore, but it sounds like FB is only sending resume events, which might cause the framerate to stack up as it re-registers requestAnimationFrame loops. So this might be a bug in Messenger instead. |
Ok! But this doesn't happen if we export with the C2 runtime, any thoughts on that? |
I guess it's a bug which we previously worked around. This is why it's better to fix the root problem than just work around it... I suppose we can work around it again, but it will leave the real problem in the Messenger platform still there. Have you tried reporting it to Facebook? |
If you can find a workaround (or a fix), that would be wonderful. We would much rather use the C3 runtime for our current and future projects. We will report it to Facebook as well. Thanks! |
An update would be very useful for my current instant game project... |
You should contact Facebook to get the root cause fixed. All we can do is work around it, which is unreliable. |
@RichardAstrom has you reported the bug to facebook already ?! This is an importend problem for instant games with c3 runtime.. i'm need a solution for the current project.. mh.. |
@masscube Yes, I reported it to Facebook on Dec 6. I got a reply that they would investigate it and the current status is "Assigned". So, we're still using the C2 runtime. |
Ah ok, thank you. I hope the fix come soon... |
Any news @RichardAstrom ? Its a littlebit bad, i can't release any (only) c3 runtime game on fb instant games.. |
@masscube Nope, nothing, status is still "Assigned". Here's the link to the bug report: https://developers.facebook.com/support/bugs/557900621304566/ |
I believe this is an issue with the Instant Games SDK. I posted in the bug report explaining my findings. Unfortunately there isn't an obvious workaround in this case so I think I will leave it to FB to fix, and hopefully they'll get on it soon. Closing this issue and will follow up on the report at https://developers.facebook.com/support/bugs/557900621304566/. |
Problem description
Games exported with the Instant Games Plugin and the C3 runtime gets really slow and unresponsive when you minimize (not close) the game (when playing with Facebook Messenger) and enter it again multiple times in a row. The FPS also increases by around 60 FPS everytime. This only happens if you export as an Instant Game and only on Android (we've tested both Android 6.0.1 & 8.1.0) not on iOS.
Attach a .c3p
instant_games_fps_test.zip
Steps to reproduce
Observed result
The FPS-counter adds another 60 fps (or whatever FPS you started with) everytime you enter the test. And although it says that the FPS gets higher (there doesn't seem to be any limit), what you notice is that the actual FPS gets lower because everything slows down. Note: this does not happen if you export with the C2 runtime.
Expected result
The FPS should stay the same and there should be no slow down.
First affected release
r128 (beta)
Affected browsers/platforms
System details
View details
Platform information
Browser: Chrome
Browser version: 70.0.3538.110
Browser engine: Blink
Browser architecture: 64-bit
Context: webapp
Operating system: Windows
Operating system version: 10
Operating system architecture: 64-bit
Device type: desktop
Device pixel ratio: 1
Logical CPU cores: 4
Approx. device memory: 8 GB
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
C3 release: r128 (beta)
Language setting: en-US
Local storage
Storage quota (approx): 14 gb
Storage usage (approx): 187 mb (1.3%)
Persistant storage: Yes
Browser support notes
This list contains missing features that are not required, but could improve performance or user experience if supported.
Nothing is missing. Everything is OK!
WebGL information
Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium)
Numeric version: 2
Supports NPOT textures: yes
Supports GPU profiling: yes
Supports highp precision: yes
Vendor: Google Inc.
Renderer: ANGLE (AMD Radeon HD 7800 Series Direct3D11 vs_5_0 ps_5_0)
Major performance caveat: no
Maximum texture size: 16384
Point size range: 1 to 1024
Extensions:
EXT_color_buffer_float
EXT_disjoint_timer_query_webgl2
EXT_texture_filter_anisotropic
OES_texture_float_linear
WEBGL_compressed_texture_s3tc
WEBGL_compressed_texture_s3tc_srgb
WEBGL_debug_renderer_info
WEBGL_debug_shaders
WEBGL_lose_context
Audio information
System sample rate: 48000 Hz
Output channels: 2
Output interpretation: speakers
Supported decode formats:
Ogg Opus (audio/ogg; codecs=opus)
WebM Opus (audio/webm; codecs=opus)
Ogg Vorbis (audio/ogg; codecs=vorbis)
WebM Vorbis (audio/webm; codecs=vorbis)
MPEG-4 AAC (audio/mp4; codecs=mp4a.40.5)
MP3 (audio/mpeg)
FLAC (audio/flac)
PCM WAV (audio/wav; codecs=1)
Supported encode formats:
WebM Opus (audio/webm; codecs=opus)
Video information
Supported decode formats:
WebM VP9 (video/webm; codecs=vp9)
WebM VP8 (video/webm; codecs=vp8)
Ogg Theora (video/ogg; codecs=theora)
H.264 (video/mp4; codecs=avc1.42E01E)
Supported encode formats:
WebM VP9 (video/webm; codecs=vp9)
WebM VP8 (video/webm; codecs=vp8)
The text was updated successfully, but these errors were encountered: