-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
js: slow to load due to no network parallelism #16
Comments
What HTTP server are you using to serve the PMTiles archive? This should only be dependent on your backend concurrency, and shouldn't have to do with pmtiles.js beyond needing to fetch directories. |
I'm doing some testing with Scaleway and it's pretty likely it doesn't support HTTP/2 out of the box, but this is a limitation of the backend and most S3-like APIs - the same latency should appear if you expanded tiles into directories in a bucket like /Z/X/Y.png. |
Indeed I found the same thing. |
Note: I should improve the docs somewhere indicating which static storage providers implement HTTP/2, as I think the parallel request issue will affect a lot of use cases. Thanks for giving PMTiles a spin! |
Good idea. |
Another perf gotcha: no caching of range requests in firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1615698 |
@eddy-geek interesting, thanks for the link! I'll investigate with Firefox more and see if there's any progress to be made there. |
I've done some research and updated the storage provider docs: https://protomaps.com/docs/pmtiles/storage-providers As far as I can tell, Google Cloud Storage is the only major provider that supports HTTP/2 out of the box for static, single-region content. The core reason the others don't is probably to differentiate their more expensive CDN, multi-region products (CloudFront, etc) from the basic storage service. |
When using
pmtiles.js
, network performance is a big bottleneck.This is visible in the leaflet raster demo but mitigated by a very fast backend (read from a small pmtiles file), so response-time is ~15ms per tile.
Still you can see in the chrome dev tools that each
fetch
request is "stalled" (queued) until the previous one is answered.My setup responds in ~150ms per tile, so time from scrolling to display is several seconds.
How can this be optimised?
The text was updated successfully, but these errors were encountered: