I tried switching to Protobufs but had some issues (maybe my protobuf data was a little malformed). It showed incomplete data, and the data it showed was sometimes not in the right positions.
Performance improvements:
set useDevicePixels to false. useDevicePixels means that Deck.gl renders at @2x (retina/high dpi), which means that it has to deal with 4x the number of pixels. Since I'm working with an animation, a higher fps is more important than perfectly crisp pixels. More info here.
Cancel animation when below minAnimationZoom. I'm not sure exactly how much this helps, because the TripsLayer is already turned off below minAnimationZoom, but it at least means that state isn't being updated.
Start animation on first load if zoom is >= minAnimationZoom. Previously, the animation was started for all zooms in componentDidMount, which means that on first load at zoom 2, the animation was already started. This means that the animation is started only if loaded from a hash above a certain zoom.
I tried switching to Protobufs but had some issues (maybe my protobuf data was a little malformed). It showed incomplete data, and the data it showed was sometimes not in the right positions.
Performance improvements:
useDevicePixels
tofalse
.useDevicePixels
means that Deck.gl renders at @2x (retina/high dpi), which means that it has to deal with 4x the number of pixels. Since I'm working with an animation, a higher fps is more important than perfectly crisp pixels. More info here.minAnimationZoom
. I'm not sure exactly how much this helps, because theTripsLayer
is already turned off belowminAnimationZoom
, but it at least means thatstate
isn't being updated.minAnimationZoom
. Previously, the animation was started for all zooms incomponentDidMount
, which means that on first load at zoom 2, the animation was already started. This means that the animation is started only if loaded from a hash above a certain zoom.