Geometry is fetched from server, while a simple join should be more effective and fast
In line #L129 the boundary is fetched (a textual representation of the boundary) is fetched. This can lead up to downloading quite a lot of data and can be optimized by doing the same statement in an inner join.
boundary_geometry = self.exposure_db.get_boundary_geometry(boundary_id)