-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit parallel image requests for raster performance #7497
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* limit parallel image requests for raster performance * add a test for maxParallelImageRequests * fix flow
@@ -17,7 +18,8 @@ const config: Config = { | |||
} | |||
}, | |||
REQUIRE_ACCESS_TOKEN: true, | |||
ACCESS_TOKEN: null | |||
ACCESS_TOKEN: null, | |||
MAX_PARALLEL_IMAGE_REQUESTS: 16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why default to 16?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to pick a number anyway, and that's what OpenLayers defaults to — it seemed to work well in practice, so I left it at that. We can adjust the default if you think 16 isn't a good value.
So this one is a properly implemented cbb059f? And you are saying that the XHR overhead shouldn't make a difference after this? |
Ah, so this actually shipped with 0.51 but was missed out from the Changelog? |
Fixes #7460, improving raster sources performance on big screens by setting a global limit on how many image requests can happen in parallel, and queueing all the rest.
Similarly to
workerCount
, the PR exposes the limit asmapboxgl.maxParallelImageRequests
which you can change (16
by default).Launch Checklist
document any changes to public APIs(probably not worth publicly documenting?)post benchmark scoresbenchmarks don't exercise big-screen tile loading