gem/oq-engine — pull request #1189 by micheles (2013-05-25 11:11:15+00:00)
Title: Added better instrumentation to the hazard getters

The hazard_getters perform 3 operations:

1. associating asset_ids <-> gmf_ids
2. getting the rupture ids
3. getting the gmvs

It is not obvious how important is to optimize step 1. My measurements on Cobain with Miriam's island with 500 SES give the following numbers:

operation | duration | pymemory
----------------------------------------+------------------+----------------------------
getting gmvs | 4821.8282287121 | 1118.3867187500000000
getting ruptures | 1554.49226474759 | 0.000000000000000000000000
associating asset_ids <-> gmf_ids | 2.8118364810937 | 0.000000000000000000000000

So, the time spent in step 1 is totally negligible.