Just some notes on my side: as discussed yesterday, the bottleneck is the computation of the LREM (Loss Ratio Exceedance Matrix). The LREM computation is a step to get the final loss ratio curve. Since the LREM depends just on the vulnerability function, we can compute the LREM once and store it in KVS. This should improve a lot the performance. The function that computes the LREM is openquake.risk.classical_psha_based._compute_lrem(vuln_function).
Just some notes on my side: as discussed yesterday, the bottleneck is the computation of the LREM (Loss Ratio Exceedance Matrix). The LREM computation is a step to get the final loss ratio curve. Since the LREM depends just on the vulnerability function, we can compute the LREM once and store it in KVS. This should improve a lot the performance. The function that computes the LREM is openquake.risk.classical_psha_based._compute_lrem(vuln_function).