Dear users,
in the last few days we have been working on the disaggregation calculator and you should expect some significant improvements to it in the next release of the engine.
While investigating the performance bottlenecks we discovered that the method `.disaggregate_poe` of aby GSIM class is one of the main reasons for the slowness of the
calculator. The problem is with the signature of the method, disaggregate_poe(self, sctx, rctx, dctx, imt, iml, truncation_level, n_epsilons). In particular the truncation_level
is passed which is used then to instantiate a scipy.stats.truncnorm class. This is a slow operation which is repeated million of times (one per rupture). In the next version of
the engine I am going to change the signature of this method to disaggregate_poe(self, sctx, rctx, dctx, imt, iml, truncnorm, n_epsilons) so that a truncnorm instance is passed
from outside. This allows instantiating the distribution function only once.
If you have scripts calling this method directly you will have to fix them. Notice that scripts calling openquake.hazardlib.calc.disaggregation will keep working as before.
Apart from that, if you have issues with disaggregation calculations (errors, memory issues, performance issues, etc) this is the right moment to speak since we are
working on that.
Michele Simionato