google / weather-tools

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

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

Closed deepgabani8 closed 1 year ago

deepgabani8 commented 1 year 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%.