Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Don't copy TileLayerIndexes on every frame.
Browse files Browse the repository at this point in the history
Fixes issue #11811 (too much CPU time spent in CrossTileSymbolIndex).
  • Loading branch information
ChrisLoer committed May 1, 2018
1 parent b820ca4 commit a6d70c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mbgl/text/cross_tile_symbol_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ CrossTileSymbolLayerIndex::CrossTileSymbolLayerIndex() {
}

bool CrossTileSymbolLayerIndex::addBucket(const OverscaledTileID& tileID, SymbolBucket& bucket, uint32_t& maxCrossTileID) {
auto thisZoomIndexes = indexes[tileID.overscaledZ];
const auto& thisZoomIndexes = indexes[tileID.overscaledZ];
auto previousIndex = thisZoomIndexes.find(tileID);
if (previousIndex != thisZoomIndexes.end()) {
if (previousIndex->second.bucketInstanceId == bucket.bucketInstanceId) {
Expand Down

0 comments on commit a6d70c2

Please sign in to comment.