Skip to content
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

Constantly creating and cancelling requests for 3D Tiles with requestRenderMode #8074

Closed
OmarShehata opened this issue Aug 15, 2019 · 8 comments

Comments

@OmarShehata
Copy link
Contributor

Sandcastle. This is a bit tricky to reproduce but I can reliably reproduce it:

  1. Open the network tab, filter for "b3dm"
  2. Move the camera a little bit.

After a bit of movement, you should start to see a seemingly endless stream of requests for b3dm tiles that keep getting cancelled and re-requested. This goes on for thousands of requests, for at least a full minute, even though it take seconds to actually load the given view if the tileset were not hidden.

This only happens with requestRenderMode: true. Seems like a bit of a corner case in the request cancelling system? @loshjawrence do you have any idea off the top of your head, or where in the code someone might want to look to debug this?

@mramato
Copy link
Contributor

mramato commented Aug 15, 2019

Sounds similar to #7786 which @loshjawrence already fixed once. requestRenderMode is important and this sounds like a major performance killer so we should fix this ASAP.

@mramato
Copy link
Contributor

mramato commented Aug 15, 2019

Preferably before the next release, but I would like to know more before tagging it that way.

@loshjawrence
Copy link
Contributor

I'll have time tomorrow to look at this

@loshjawrence
Copy link
Contributor

Update Sandcastle

Looks like the tileset's show boolean isn't updated from the more global primitives.show

@loshjawrence loshjawrence mentioned this issue Aug 16, 2019
@loshjawrence
Copy link
Contributor

Potential fix #8081

@dennisadams
Copy link
Contributor

I don't think #8081 properly solves the issue.
I have this issue also when I create a new tileset with show : false.
I can't however make scene.primitives.show = false, because I have other tilesets and primitives that I do want to show.
I haven't dug deep into your optimizations @loshjawrence, but maybe here in Cesium3dTileset.js:

if ((pass === Cesium3DTilePass.PRELOAD && (!this.preloadWhenHidden || this.show)) ||
    (pass === Cesium3DTilePass.PRELOAD_FLIGHT && (!this.preloadFlightDestinations || (!this.show && !this.preloadWhenHidden))) ||
    (pass === Cesium3DTilePass.REQUEST_RENDER_MODE_DEFER_CHECK && !this.cullRequestsWhileMoving && this.foveatedTimeDelay <= 0)) {
    return;
}

you should have a check of this.show also in the third condition line.
This worked for me:

(pass === Cesium3DTilePass.REQUEST_RENDER_MODE_DEFER_CHECK && ((!this.cullRequestsWhileMoving && this.foveatedTimeDelay <= 0) || !this.show))

but I don't know if it hurts any optimization.

@loshjawrence
Copy link
Contributor

Thanks @dennisadams.

@OmarShehata
Copy link
Contributor Author

This should now be fixed with #8081.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants