I did try using the find_objects_mult and it returned me a list of ids .. I
wasn't sure which object id corresponds to which subject or was I supposed
to assume it was the same order as the input subject id list. Since we just
wanted the code working for now so that Maurice could made progress, I went
for what I knew will work. Optimizations to follow.



On Mon, Mar 24, 2014 at 11:21 AM, Michael Meisinger <
notifications@github.com> wrote:

> In ion/services/sa/product/data_product_management_service.py:
>
> > +
> > +            event_objs = self.container.event_repository.event_store.find_
> by_query(query)
> > +
> > +        except:
> > +            log.warning("Could not find events for specified data products")
> > +            event_objs = []
> > +
> > +        # Start populating the response structure
> > +        for data_product_id in data_product_id_list:
> > +            response_data[data_product_id] = {"dataset_id" : None,
> > +                                              "updated" : False,
> > +                                              "current_geospatial_bounds" : None,
> > +                                              "current_temporal_bounds" : None}
> > +
> > +            # Need dataset id in response data
> > +            ds_ids,_ = self.clients.resource_registry.find_objects(subject=data_product_id,
>
> This is a RR call inside a for loop. There should be a warning note that
> this should be replaced with more efficient code.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/ooici/coi-services/pull/1951/files#r10898189>
> .
>