CPU Perf Issues (photogrammetry/julie)
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
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


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?).

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

Related to above, model updates in a batched model update. Possible to promisify in any way?

Traversal time consistently dominated by updateVisibility. Ex:

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

Misc:
RequestScheduler.getServerKey chews up most of the time in RequestScheduler.request
Contributor guide
Research direction
Start by profiling the photogrammetry/julie combineRelease case, focusing on gl.texImage2D/imageDecode, createBitmapImage, model.update, batched3dmodel3dtilecontent.update, updateVisibility, and RequestScheduler.getServerKey. Compare the referenced createImageBitmap and non-bitmap traces; the issue does not define a concrete fix or acceptance criteria, so what counts as done remains unspecified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100