Skip to content

perf: use source.coop proxy for dynamical Zarr example - #471

Merged
kylebarron merged 2 commits into
mainfrom
examples/dynamical-zarr-ecmwf/use-source-proxy
Apr 24, 2026
Merged

kylebarron merged 2 commits into
mainfrom
examples/dynamical-zarr-ecmwf/use-source-proxy

Conversation

@alukach

@alukach alukach commented Apr 24, 2026 •

Copy link
Copy Markdown
Member

Change list

  • Switching to source.coop proxy allows us to use HTTP/3 connections, which improves load times because we can use HTTP multiplexing and increase the max number of concurrent requests
  • Set maxRequests higher than the default of 6

@alukach
alukach requested a review from kylebarron April 24, 2026 18:59
@kylebarron kylebarron changed the title perf: use data.source.coop for h3 connections and improved load time perf: use source.coop proxy for dynamical Zarr example Apr 24, 2026
selection,
getTileData,
renderTile,
maxRequests: 0,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should still be a positive number, not 0, or else request cancellation is never applied.

I.e. if you pan around the world instantly, all of those requests that were visible for a fraction of a second will still be allowed to finish.

I think 20 is a reasonable suggestion

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
maxRequests: 0,
maxRequests: 20,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It surprises me that this effects the behavior of cancelling requests that are out of the viewport, but if so then I agree

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, perhaps I spoke too soon. I can't remember exactly how deck.gl's request cancellation works

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just verified that my initial hunch was right.

If you set maxRequests: 0 you will never get request cancellation. When set to maxRequests: 0, I tested panning very fast and I never saw a request get cancelled. With 20 seconds of fast panning I requested 3GB of data chunks 😄

I think this is because the request scheduler works by checking:

  • What are the tiles we have yet to request?
  • When is there new slots to request tiles

I guess it's essentially a semaphore?

When maxRequests: 0, the request has already been sent, so deck.gl doesn't see it to cancel it...?

I'm not sure this makes sense, but it's what I see in practice.

@kylebarron
kylebarron enabled auto-merge (squash) April 24, 2026 19:02
@kylebarron
kylebarron merged commit 958e4d7 into main Apr 24, 2026
4 checks passed
@kylebarron
kylebarron deleted the examples/dynamical-zarr-ecmwf/use-source-proxy branch April 24, 2026 19:04
@ds-release-bot ds-release-bot Bot mentioned this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants