Skip to content

Commit

Permalink
fix severe performance regression after introduction of image express…
Browse files Browse the repository at this point in the history
…ion (mapbox#9261)
  • Loading branch information
mourner authored and mike-unearth committed Mar 18, 2020
1 parent d36476e commit 253ac8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/style/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,11 @@ class Style extends Evented {
this.sourceCaches[sourceId].used = false;
}

const availableImages = this.imageManager.listImages();
for (const layerId of this._order) {
const layer = this._layers[layerId];

layer.recalculate(parameters, this.imageManager.listImages());
layer.recalculate(parameters, availableImages);
if (!layer.isHidden(parameters.zoom) && layer.source) {
this.sourceCaches[layer.source].used = true;
}
Expand Down

0 comments on commit 253ac8a

Please sign in to comment.