gem/oq-hazardlib — pull request #192 by micheles (2014-03-28 06:44:49+00:00)
Title: Light weight site collection

The goal of this pull request is to save memory when dealing with large site collections, especially in the case when the site model parameters are uniform (i.e. the same for all the sites). See https://bugs.launchpad.net/oq-engine/+bug/1295588 for the details. Using this approach I was able to reduce the memory occupation by a factor of nearly 4 for the script included in the bug report. In other words, to keep in memory all the filtered site collections for the South America model with ~85,000 points and maximum distance of 100 Km only 85M are needed instead of 328M. Notice that the impact of the saving on the engine is minor because there the memory is spent when reading the sites from the database, before building the site collection.