While _getModel is run only once per layer, essentially on initialization, the default ProgramManager is shared by all deck.gl layers. This means that each new layer that's rendered as a sublayer of the TileLayer adds new hooks.
Therefore the shader hooks on the program manager end up increasing more and more:
It appears there isn't a general solution in luma.gl to only add once globally, so I'll just check in the programManager._hookFunctions.
I recently noticed some poor performance, especially when panning (and thus creating new
RasterLayer
s, which I ended up being able to debug down to https://github.com/kylebarron/deck.gl-raster/blob/7a3e90efc3eb705657eb950a9f6da819322b763f/src/deckgl/raster-layer/raster-layer.js#L89-L95While
_getModel
is run only once per layer, essentially on initialization, the defaultProgramManager
is shared by all deck.gl layers. This means that each new layer that's rendered as a sublayer of theTileLayer
adds new hooks.Therefore the shader hooks on the program manager end up increasing more and more:
It appears there isn't a general solution in luma.gl to only add once globally, so I'll just check in the
programManager._hookFunctions
.