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

CPU Perf Issues (photogrammetry/julie) #7400

Open
loshjawrence opened this issue Dec 10, 2018 · 3 comments
Open

CPU Perf Issues (photogrammetry/julie) #7400

loshjawrence opened this issue Dec 10, 2018 · 3 comments

Comments

@loshjawrence
Copy link
Contributor

loshjawrence commented Dec 10, 2018

Just documenting current CPU perf issues in cesium (photogrammetry/julie).

representative of combineRelease.

Biggest and most consistent bottleneck: gl.texImage2D -> imageDecode. The only way to shorten it within in a frame is to texSubImage2D (upload images a chunk at a time) but this will make scene loading much longer. createBitmapImage was created to offload some of the heavy work performed by texImage2D in an async manner so that the blocking texImage2D won't take so long. All of this according to:
https://stackoverflow.com/questions/51710067/webgl-async-operations

photogram_teximage2dimagedecode

photo_batchedmodelupdate

Original attempt to solve using createBitmapImage: #6624
If multiple createBitmapImage calls can be done in parallel would need to promisify further up the call stack (model.update within batched3dmodel3dtilecontent.update?).
photo_createbitmapimage

createImageBitmap vs not. Red bars are the chrome profilers way of indicating that there's a really low fps at that point.
nyc_nonbitmap_vs_bitmappng

Related to above, model updates in a batched model update. Possible to promisify in any way?
photot_manymodelupdates
Traversal time consistently dominated by updateVisibility. Ex:
photo_manyupdateandpushchildren

'Run microtasks' taking up this much time is surprisingly (or unsurprisingly?) common.
photo_microtasks

Misc:
RequestScheduler.getServerKey chews up most of the time in RequestScheduler.request

@mramato
Copy link
Contributor

mramato commented Dec 10, 2018

Is this using combined Cesium or modules? Are these numbers with debug code removed? (i.e. combineRelease)? If not, they could be off because of parameter validation overhead.

We should always profile with combineRelease and include any additional details about the profiling method in issues like this.

@loshjawrence
Copy link
Contributor Author

I'll re-check with combineRelease

@loshjawrence
Copy link
Contributor Author

loshjawrence commented Dec 10, 2018

Same relative bottlenecks and existing images are still representative (and colored, combine release's aren't) so I'll keep them as is. Combing through it looks like times are similar if not the same.

@loshjawrence loshjawrence changed the title CPU Perf Issues (photogrammetry) Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants