Open jobblefrobble opened 4 months ago
I've started work on this in a fork, will aim to put out a PR sometime soon, though will likely need guidance around using config values within workers and how best to test it π
I've submitted a draft PR for this with some questions about injecting config values into workers π
Motivation
If you have many vector tile sources present on the map then animations can send out a huge number of concurrent requests, potentially overwhelming the browser and throwing
ERR_INSUFFICIENT_RESOURCES
errors which don't get retried by mapbox resulting in missing tiles. More seriously it can disrupt all other concurrent requests being sent out by the browser.I think this is also related to some of the problems outlined by #13208
Design Alternatives
There was talk of a
TileQueue
on #6643 :I'm wondering if such a thing could be added for vector sources too? Though maybe 16 is too conservative a number for vector tiles
Mock-Up
It would be nice to expose a variable similar to the existing
mapboxgl.maxParallelImageRequests
, but applying to vector tiles rather than images. e.g.mapboxgl.maxParallelVectorTileRequests