google / weather-tools

Tools to make weather data accessible and useful.
https://weather-tools.readthedocs.io/
Apache License 2.0
208 stars 39 forks source link

Not re-initializing ee if it's already initialized in the same worker. #399

Closed deepgabani8 closed 11 months ago

deepgabani8 commented 11 months ago

Earlier it was (re)initializing earthengine client upon every ingestion call, which in turn was calling ee highvolume api.

In beam dataflow, we essentially need to initialize earthengine only once in a device, not even a dataflow worker. These changes initializes ee only if necessary. Now it makes 50% less EE calls in filter and ingestion step.

Effect: Increases ingestion speed by roughly 100%.