-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a quick performance check. The patch improves the performance (1024x768 mbgl-glfw release build on 3.2 GHz 6-Core Intel Core i7 macMini):
a) when there's no pitch, dropped frames take up to 50ms. This was several seconds before.
b) with 60 degree pitch, dropped frames usually take up to 9000ms.
@pozdnyakov, agree with conclusion that this, due to the severity of the issue and even though it is addressing the symptoms and not the root cause (overscaling tiles and buckets we loose the granularity and performance of tiled approach) is worth having as an intermediate fix.
78fcd82
to
a7cacfc
Compare
Only buckets with the same leader id participate in `TileLayerIndex::findMatches()` in order to improve its performace. `TileLayerIndex` constness is fixed.
So that it can retain ownership of the given parameters.
…iles For overscaled tiles the viewport might be showing only a small part of the tile, so we filter out the off-screen symbols to improve the performance.
a7cacfc
to
688f545
Compare
if (isInVewport(tileMatrix, symbolInstance.anchor.point)) { | ||
symbolInstance.crossTileID = 0u; | ||
} else { | ||
symbolInstance.crossTileID = SymbolInstance::invalidCrossTileID(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this delay symbol placement by 300ms for out-of-viewport symbols when we pan overscaled tile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it won't, as we reassign those ids at every frame
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
const auto& thisZoomIndexes = indexes[tileID.overscaledZ]; | ||
namespace { | ||
|
||
bool isInVewport(const mat4& posMatrix, const Point<float>& point) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pozdnyakov should this be spelled isInViewport
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah 😬 thanks for the catch, will fix it in a following patch..
Before this change cross tile symbol indexing was a performance bottle neck, for the overscaled tiles in particular. This pull request optimizes the cross tile symbol indexing code path:
Fixes https://github.com/mapbox/mapbox-gl-native-team/issues/133