commit/galaxy-central: dannon: mapping change: For data libraries of sufficient size, eager loading related to getting the root_folder of a library was causing huge delays. This should reduce the delay in viewing a library of ~500 items by about 90%.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/3f3740a5f1c9/ changeset: r5291:3f3740a5f1c9 user: dannon date: 2011-03-31 20:09:47 summary: mapping change: For data libraries of sufficient size, eager loading related to getting the root_folder of a library was causing huge delays. This should reduce the delay in viewing a library of ~500 items by about 90%. affected #: 1 file (17 bytes) --- a/lib/galaxy/model/mapping.py Thu Mar 31 11:27:49 2011 -0400 +++ b/lib/galaxy/model/mapping.py Thu Mar 31 14:09:47 2011 -0400 @@ -1268,7 +1268,7 @@ assign_mapper( context, Library, Library.table, properties=dict( root_folder=relation( LibraryFolder, backref=backref( "library_root" ) ) - ) + ) ) assign_mapper( context, LibraryInfoAssociation, LibraryInfoAssociation.table, @@ -1281,26 +1281,26 @@ ) ) assign_mapper( context, LibraryFolder, LibraryFolder.table, - properties=dict( - folders=relation( - LibraryFolder, + properties=dict( + folders=relation( + LibraryFolder, primaryjoin=( LibraryFolder.table.c.parent_id == LibraryFolder.table.c.id ), order_by=asc( LibraryFolder.table.c.name ), backref=backref( "parent", primaryjoin=( LibraryFolder.table.c.parent_id == LibraryFolder.table.c.id ), remote_side=[LibraryFolder.table.c.id] ) ), - active_folders=relation( LibraryFolder, - primaryjoin=( ( LibraryFolder.table.c.parent_id == LibraryFolder.table.c.id ) & ( not_( LibraryFolder.table.c.deleted ) ) ), - order_by=asc( LibraryFolder.table.c.name ), + active_folders=relation( LibraryFolder, + primaryjoin=( ( LibraryFolder.table.c.parent_id == LibraryFolder.table.c.id ) & ( not_( LibraryFolder.table.c.deleted ) ) ), + order_by=asc( LibraryFolder.table.c.name ), lazy=True, #"""sqlalchemy.exceptions.ArgumentError: Error creating eager relationship 'active_folders' on parent class '<class 'galaxy.model.LibraryFolder'>' to child class '<class 'galaxy.model.LibraryFolder'>': Cant use eager loading on a self referential relationship.""" viewonly=True ), datasets=relation( LibraryDataset, - primaryjoin=( ( LibraryDataset.table.c.folder_id == LibraryFolder.table.c.id ) ), - order_by=asc( LibraryDataset.table.c._name ), - lazy=False, + primaryjoin=( ( LibraryDataset.table.c.folder_id == LibraryFolder.table.c.id ) ), + order_by=asc( LibraryDataset.table.c._name ), + lazy=True, viewonly=True ), active_datasets=relation( LibraryDataset, primaryjoin=( ( LibraryDataset.table.c.folder_id == LibraryFolder.table.c.id ) & ( not_( LibraryDataset.table.c.deleted ) ) ), - order_by=asc( LibraryDataset.table.c._name ), - lazy=False, + order_by=asc( LibraryDataset.table.c._name ), + lazy=True, viewonly=True ) ) ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket