gem / oq-engine

OpenQuake Engine: a software for Seismic Hazard and Risk Analysis
https://github.com/gem/oq-engine/#openquake-engine
GNU Affero General Public License v3.0
380 stars 273 forks source link

Solved New Zealand model ultra-slow on "Applying uncertainties" #9691

Closed micheles closed 4 months ago

micheles commented 4 months ago

In reality the problem was in .set_trt_smr because the cache on group_array(source_data, 'source') was not used :-( The speedup is huge, from 1 hour to 2 minute in the full calculation. In a reduce calculation I get

# before/after
| ncalls | cumtime | path                                |
|--------+---------+-------------------------------------|
|      1 | 825.102 | source_reader.py:399(_build_groups) |
|      1 |  53.062 | source_reader.py:399(_build_groups) |

Supersedes https://github.com/gem/oq-engine/pull/9687.

NB: the fake change on the CSV has nothing to do with the PR. Damned CSVs!