gem/oq-hazardlib — pull request #126 by micheles (2013-06-28 15:07:42+00:00)
Title: Pickeable sources

If the sources were pickleable, one could filter them only once, in the controller node, and then send them to the workers. At the present instead, the filtering of the sources is repeated several times in the event based calculator
(https://github.com/gem/oq-engine/blob/master/openquake/engine/calculators/hazard/event_based/core.py#L131).
This is inefficient, especially in large computations such as the one for Japan.
Notice that the efficiency of sending the sources via celery must be measured; but in any case having pickleable objects is a good thing. I am also making a large use of __slots__ to keep the memory consumption at the minumum.

See https://bugs.launchpad.net/oq-engine/+bug/1195769