diff options
author | Chris Loer <chris.loer@gmail.com> | 2018-05-01 13:05:51 -0700 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2018-05-01 15:25:26 -0700 |
commit | a6d70c2db73daf6b490be976b86a1c826a2edc3e (patch) | |
tree | fbbed7edda3a83e98d913dfada2d7b12b326f6ce /src/mbgl/text | |
parent | b820ca4686b923785f359d4e7054a2c47b5faff8 (diff) | |
download | qtlocation-mapboxgl-a6d70c2db73daf6b490be976b86a1c826a2edc3e.tar.gz |
[core] Don't copy TileLayerIndexes on every frame.
Fixes issue #11811 (too much CPU time spent in CrossTileSymbolIndex).
Diffstat (limited to 'src/mbgl/text')
-rw-r--r-- | src/mbgl/text/cross_tile_symbol_index.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/text/cross_tile_symbol_index.cpp b/src/mbgl/text/cross_tile_symbol_index.cpp index f88bab9d6f..01a4a02b4e 100644 --- a/src/mbgl/text/cross_tile_symbol_index.cpp +++ b/src/mbgl/text/cross_tile_symbol_index.cpp @@ -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) { |