read_sites_from_exposure() parses the entire exposure model unnecessarily

Bug #932656 reported by Muharem Hrnjadovic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
Medium
Lars Butler

Bug Description

[et=8h]
[at=5.5h]

read_sites_from_exposure() parses the entire exposure model unnecessarily which is wasteful. See openquake/engine.py, line 338 ff.

Notes from Lars:

This function could just be re-written to query the sites from the exposure model in the database.

Changed in openquake:
status: New → Confirmed
importance: Undecided → Medium
tags: added: nrml performance risk techdebt
Revision history for this message
Andrea Cerisara (acerisara) wrote :

I found also the function is really slow in checking for duplicates when we use an exposure of a reasonable size (I used an exposure with 50k~ assets). Maybe we can address this problem at the same time.

description: updated
Changed in openquake:
assignee: nobody → Lars Butler (lars-butler)
milestone: none → 0.6.1
description: updated
Revision history for this message
Lars Butler (lars-butler) wrote :
description: updated
Changed in openquake:
status: Confirmed → In Progress
Changed in openquake:
status: In Progress → Fix Committed
Changed in openquake:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.