# Compute time series for 70,000 locations (Speed up the processing)

**URL:** <https://discourse.pangeo.io/t/compute-time-series-for-70-000-locations-speed-up-the-processing/4436>\
**Category:** Uncategorized\
**Created:** [August 21, 2024, 2:13pm UTC](https://discourse.pangeo.io/t/compute-time-series-for-70-000-locations-speed-up-the-processing/4436 "2024-08-21T14:13:12Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![clausmichele](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.pangeo.io/clausmichele/32/2665_2.png) [@clausmichele](https://discourse.pangeo.io/u/clausmichele)\
**Post date:** [August 23, 2024, 1:49pm UTC](https://discourse.pangeo.io/t/compute-time-series-for-70-000-locations-speed-up-the-processing/4436/4 "2024-08-23T13:49:47Z")

</div>

Hi @Basile_Goussard, I have some additional remarks:

- Do you consider all the time steps or do you filter out cloudy scenes beforehand using the `eo:cloud_cover` property? If not applied already, this could save you some time, reducing the number of Items you need to load.
- Are you running the computation in a serial manner? If you have more than 1 CPU you could easily parallelize the whole computation using libraries like `joblib`, `multiprocessing` or `dask`
- You could also think about grouping the geometries based on their location and to which Sentinel-2 tile(s) they correspond. This would allow to reduce the number of STAC API calls and reuse the same xarray object to get the info about multiple points at once.
- Finally, really important, are you considering the baseline processing change that happened in 2022? Otherwise you might see strange differences in the indices you compute comparing years before 2022 and afterwards. References:
  - [Sentinel-2 BOA\_ADD\_OFFSET harmonisation · Issue #134 · microsoft/PlanetaryComputer · GitHub](https://github.com/microsoft/PlanetaryComputer/issues/134)
  - [Planetary Computer](https://planetarycomputer.microsoft.com/dataset/sentinel-2-l2a#Baseline-Change)

---

_[View the full topic](https://discourse.pangeo.io/t/compute-time-series-for-70-000-locations-speed-up-the-processing/4436)._
