-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
"canonicalize" tile urls from TileJSON so they use config.API_URL #7400
Comments
Hm, the main reason this function exists in Native is for caching: the TileJSON endpoints from |
sorry, rereading the title of this issue and it's exactly what we use it for 😅 |
@kkaefer good to know about the caching behavior. fwiw I took a closer look at the native codebase, and confirmed that native isn't making requests to the |
Yeah good point. Mapbox TileJSONs return a Apart from the number of simultaneous connections, another consideration is also DNS resolution: We're typically loading a style from |
according to the internet the minimum limit for browsers we support is 6 🤔 I can run some benchmarks on various browsers to see if this change would affect network request performance. Are there any other metrics we'd want to collect before making this change? |
hm, limiting to 6 concurrent connections may actually be beneficial in many situations since it avoids overloading the network. I think it's worth trying and benchmarking how this changes load times. The "Additional Tools for Xcode include a Network Link Conditioner prefpane that allows controlling the bandwidth and other network properties. Note that as of macOS Mojave you'll have to manually copy it to |
gl-native has a step where it converts mapbox.com tile urls to use the mapbox:// prefix so that they ultimately fire requests at the
baseApiUrl
domain. we should add behavior in mapbox-gl-js as well, I think.https://github.com/mapbox/mapbox-gl-native/blob/f3341dd589c6330c0cfd6e8e381398d08493b48a/src/mbgl/util/mapbox.hpp#L21-L22
we should also consider adding a setter/getter for API_URL (native exposes these functions here)
The text was updated successfully, but these errors were encountered: