-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Request Scheduler from 3d-tiles #3476
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
be9e9ce
New request scheduler
lilleyse 3f38546
Fix mistake from my testing
lilleyse a1cc29b
More tests and slightly different order-of-operations for cancelled r…
lilleyse 172da97
More tests and fix re-sorting priority
lilleyse 8d698e9
Fix GEE
lilleyse 28c03c1
Spec fixes
lilleyse 38b9d55
Fixed tests by letting unfinished tests go through
lilleyse da3420d
Remove RequestScheduler.clearForSpecs from being called for every test
lilleyse b9e8042
Cleanup
lilleyse 0b3b1cc
Improved doc
lilleyse bfb356c
Merge branch 'master' into request-scheduler-master
lilleyse cfe237f
Clear request scheduler before each ImageryProvider test
lilleyse 228bb06
Fix for tests
lilleyse 40b9293
Remove while(true) which fixes eslint error
lilleyse bf9119e
Merge branch 'master' into request-scheduler-master
pjcozzi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Right now every terrain/imagery provider sets
throttleByServer
to true which limits to 6 active requests per server. Once more of these servers switch over to http2 this flag will hold them back. WithCesiumTerrainProvider
and some others we'll know when the make the switch, but this doesn't help people using custom providers. Should an option likethrottleByServer
be exposed on the provider level for users to tweak?This same idea applies to 3D tilesets too. A
throttleByServer
option could be sent in when constructing the tileset.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 think something less coarse-grained or at least named differently needs to be exposed. Have you looked at other engines using HTTP2 or doc on best practices with HTTP2?
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 think I've been pretty clear that I'm squarely in the "don't throttle" crowd (I'm all for prioritization and cancellation, just not throttling) so take this with that bias up front.
Just because a server supports HTTP/2, doesn't mean the client does. So it's impossible for the developer to make this decision during development. As far as I know, it's also impossible to detect at runtime whether you're using HTTP/2, so we can't do some magic on our end either. That means the best option is to not throttle at all and let the browser handle it.
I tried to hunt around to see what other webmaps are doing, and as far as I can tell none of them throttle (I checked OL/Leaflet/Mapbox). OpenLayers has an open issue to cancel unneeded requests, but that's it.
But since I'm not going to be able to convince you guys to not do it, I think the second best option is having a single top-level setting on
RequestScheduler
to disable it. I know the initial implementation had this, I'm not sure about the one in this branch (haven't gotten to that part of the code yet).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.
If HTTP/2 becomes widely adopted, I agree that throttling by server is a waste. However as of now throttling does make a big difference to performance:
I just got these numbers for an Everest static view:
When would the client not support HTTP/2?
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.
Up until recently, not all browsers supported it, and even then there could be lots of atypical browsers (embedded, webview, etc..) that don't support it. In the long run, everyone will.
I know I'm missing something, but why are there less requests with the 4G version? Shouldn't the total number of requests be the same? (if we're just talking about throttling and not cancellation).
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 suspect that none of us individually knows enough about everything - tile selection and HTTP2 - to make a good call here. Let's get together for a few minutes today in person. @lilleyse please organize.