mousebird-consulting-inc / WhirlyGlobe

WhirlyGlobe Development
Other
830 stars 255 forks source link

Accelerate globe rendering by minimizing serialized offline tile work #1543

Open TimSylvester opened 2 years ago

TimSylvester commented 2 years ago

MapboxVectorInterpreter.dataForTile has a large critical section synchronized on the one and only offline renderer which will end up serializing the (re-)parsing and rendering of tile data into background tiles and some image processing.

I believe the image processing can simply be moved out of the critical section. The parsing can theoretically be done in parallel on a single offline renderer, so long as only one set of results is enabled/rendered/disabled at once, but it might be better to just use multiple offline renderers to parallelize tiles.

The same set of concerns applies to MapboxVectorInterpreter.dataForTile on Android.