sepal-contrib / sdg_15.3.1

monitor SDG indicators at plot level
MIT License
3 stars 3 forks source link

improve computation time #40

Closed 12rambau closed 2 years ago

12rambau commented 3 years ago

I changed assignation, I don't have enought time to work on this project and I already spend way too much time correcting bug and bad implementation (at the moment, I'm not payed to work on this project).

I've left in the code 2 examples of howyou should use the map method instead of creating ee.List and then cast them to ee.ImageCollection. It is not working as it because I can't understand how they are used afterward L147.

Just understand that you should avoid at all cost the use of for loop in your code as it forces the API to request input from the server. The only thing we should request is the final image for display or export.

As the current code seems to work, I would suggest to create a new branch to make your development and push it once everything works

12rambau commented 3 years ago

just to confirma my thoughts on the use of for loops https://gis.stackexchange.com/questions/378469/improving-execution-time-of-task-start