Metal Optimizations (#1748)

This commit is contained in:
Tim Sylvester
2023-10-10 18:34:44 -07:00
committed by GitHub
parent d63f94f5a8
commit ce0096aab0
9 changed files with 131 additions and 71 deletions

View File

@@ -351,6 +351,11 @@ void GeometryTileWorker::parse() {
featureIndex = std::make_unique<FeatureIndex>(*data ? (*data)->clone() : nullptr);
// Avoid small reallocations for populated cells.
// If we had a total feature count, this could be based on that and the cell count.
constexpr auto estimatedElementsPerCell = 8;
featureIndex->reserve(estimatedElementsPerCell);
GlyphDependencies glyphDependencies;
ImageDependencies imageDependencies;