BlockedSource: Duplicated HTTP range requests
We are using geotiff.js to retrieve COG data in Giro3D, as seen in this example: https://giro3d.org/examples/cog_elevation.html
Many times, we see that the exact same request is sent by geotiff.js: same URL, same Content-Range and Content-Length headers, resulting in a massive increase of the data to download. Depending on the compression used, and the bitness of the image, the increase can be catastrophic.
The displayed terrain is subdivided in a hierarchical grid, meaning that there will be some overlap between grid cells and COG tiles: the same COG tiles will be shared among neighbour cells. Now I expect that the BlockedSource deduplicate requests for the same slice of data, but it seems that it does not (or at least not always).
Can you check if https://github.com/geotiffjs/geotiff.js/pull/381 fixes your issue?
Can you check if #381 fixes your issue?
I'm testing right now, but #382 prevents the use of the tile cache, so your optimization is never used :(
So with applying the fix for #382 I don't see any duplication in requests anymore (previously, some tiles were loaded 2, 3 or even 4 times)