I believe I've found a bug related to requestRenderMode in Firefox. I asked about it in the forums (https://groups.google.com/forum/#!topic/cesium-dev/cHR1qyjMKeo) and a community member suggested I file a bug.
Essentially, Cesium doesn't stop the update/render process in Firefox until you interact (move, zoom) with the globe after the page initially loads. You can see this happen by visiting the Sandcastle demo at https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Scene%20Rendering%20Performance.html. In Chrome, the FPS flatline to "N/A" within a few seconds after page load. The FPS never flatline after the page load in Firefox, however, until you move the globe or zoom in.
Cesium: 1.4.7
Browser: Firefox 61.0.1
OS: CentOS 7.5
Thanks @knackjason for the report!
I'm using Firefox 61.0 and Cesium 1.47 I'm not able to replicate (the FPS go to N/A within a second or so), so this may take more investigation.
If you're able to debug, I would watch to see if any functions are getting added to the FrameState.afterRender array, as that's likely why the render loop is continually running.
@ggetz what OS are you using? I tried Firefox 61 on Windows and also saw the FPS go to N/A within a second. This is not happening for me in Linux (CentOS 7.5), so maybe it's more of a bug with Firefox on Linux.
I'm happy to help debug but am also brand new to Cesium. Can you point me in the direction of how I'd watch the FrameState.afterRender array?
@mramato can you try this out on your linux machine?
I can reproduce this on Windows/Linux with either Chrome or Firefox.
Going off of what @mramato said, I'm also noticing that Cesium will start rendering forever in an unmaximized window after any kind of browser resize (whether it's maximizing or just increasing/decreasing with the mouse).
I updated the title and marked this as next release since it seems like a pretty bad break for requestRenderMode.
Thanks again for reporting @knackjason!
No problem!
I can confirm this behavior in both Chrome and Firefox on my mac.
I couldn't pin down a commit with git bisect (full log here) but I did learn some things:
I don't think I know enough to debug this any further but based on those commits @bagnell might know.
Actually I think I've tracked this down. The camera frustum changes because the viewport resizes but the checkForCameraUpdates function doesn't register the change. this._frustumChanged always evaluates to true because this._cameraClone isn't updated (see Scene.js#L3313).
EDIT: e331d4c is when this._frustumChanged was introduced, 22ecbe6 is when it was changed to use .equals instead of !==.
Just a reminder that the release is this Wednesday. We should really try and get all showstopper issues addressed by the end of today.
Congratulations on closing the issue! I found these Cesium forum links in the comments above:
https://groups.google.com/forum/#!topic/cesium-dev/cHR1qyjMKeo
If this issue affects any of these threads, please post a comment like the following:
The issue at https://github.com/AnalyticalGraphicsInc/cesium/issues/6812 has just been closed and may resolve your issue. Look for the change in the next stable release of Cesium or get it now in the master branch on GitHub https://github.com/AnalyticalGraphicsInc/cesium.
__I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.__
:earth_africa: :earth_americas: :earth_asia:
Thanks, @lukesanantonio and everyone else for the fix! I'm looking forward to getting it on Wednesday.
Most helpful comment
I can reproduce this on Windows/Linux with either Chrome or Firefox.