Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #5779 (closed)

Opened 13 years ago

Closed 13 years ago

BUG: gateway.getObjects("FileAnnotation") slow down preformance

Reported by: atarkowska Owned by: atarkowska
Priority: critical Milestone: OMERO-Beta4.3
Component: OmeroPy Version: n.a.
Keywords: n.a. Cc: jamoore, cxallan, jburel, wmoore
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-06-16 (14)

Description (last modified by atarkowska)

getObjects should link original files in the first call, otherwise every time FileAnnotationWrapper? is making separate query.

class FileAnnotationWrapper (AnnotationWrapper):
    """
    omero_model_FileAnnotatio class wrapper extends AnnotationWrapper.
    """

    OMERO_TYPE = FileAnnotationI

    def __loadedHotSwap__ (self):
        """
        Checks that the Annotation's File is loaded - Loads if needed. 
        """
        if not self._obj.file.loaded:
            self._obj._file = self._conn.getQueryService().find('OriginalFile', self._obj.file.id.val)

Change History (7)

comment:1 Changed 13 years ago by atarkowska

  • Cc jmoore cxallan added
  • Component changed from General to OmeroPy
  • Description modified (diff)
  • Priority changed from minor to critical

comment:2 Changed 13 years ago by atarkowska

  • Cc jburel added

comment:3 Changed 13 years ago by jburel

To load specific annotation type, there is the method loadSpecifiedAnnotations in IMetatada, it is also possible
to include/exclude some name spaces
e.g. pseudo-code

ParametersI po = new ParametersI();
if (userID >= 0) po.exp(omero.rtypes.rlong(userID));
List<String> toInclude = new ArrayList<String>();
List<String> toExclude = new ArrayList<String>();
if (nameSpace != null) 
toInclude.add(nameSpace);
if (FileAnnotationData.class.equals(annotationType)) {
//for info  FileAnnotationData.FLIM_NS = omero.constants.analysis.flim.NSFLIM.value;
  toExclude.add(FileAnnotationData.COMPANION_FILE_NS); 
  toExclude.add(FileAnnotationData.MEASUREMENT_NS);
  toExclude.add(FileAnnotationData.FLIM_NS);
  toExclude.add(FileAnnotationData.EXPERIMENTER_PHOTO_NS);
}
IMetadataPrx service = getMetadataService();
service.loadSpecifiedAnnotations(FileAnnotation.class.getName(), toInclude, toExclude, options));

In that case the file annotations+original files will be loaded.

comment:4 Changed 13 years ago by Will Moore <will@…>

(In [c84ca5ac4dc6fb8c3586cb3213a00472bea3593d/ome.git] on branch develop) Blitz method listFileAnnotations() using metadataService. See #5779

comment:5 Changed 13 years ago by Will Moore <will@…>

(In [49785e7b2b0a09451d941454304783f54b6498d4/ome.git] on branch develop) gatewaytest for new listFileAnnotations() functionality. See #5779

comment:6 Changed 13 years ago by wmoore

  • Cc wmoore added
  • Owner changed from wmoore to atarkowska

comment:7 Changed 13 years ago by Aleksandra Tarkowska <aleksandrat@…>

  • Remaining Time set to 0
  • Resolution set to fixed
  • Status changed from new to closed

(In [c0debabb03d801dd91c55a703bb52f029b6c904f/ome.git] on branch develop) this update webclient and close the performance issue, close #5779

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.72207 sec.)

We're Hiring!