Allon Mureinik has posted comments on this change.

Change subject: engine: Make VDSPartial, a partially loaded VDS object
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

....................................................
Commit Message
Line 3: AuthorDate: 2013-11-26 09:03:20 +0200
Line 4: Commit:     lzel...@redhat.com <lzel...@redhat.com>
Line 5: CommitDate: 2013-11-26 09:16:58 +0200
Line 6: 
Line 7: engine: Make VDSPartial, a partially loaded VDS object
I think the description needs to be updated - you haven't created a VDSPartial 
class in this revision of the patch.
Line 8: 
Line 9: Since loading a full VDS object is time consuming, this patch introduces
Line 10: a VDSPartial object, that is much faster to load. VDSPartial loading 
takes
Line 11: 5ms as opposed to 8ms for VDS


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAODbFacadeImpl.java
Line 354:         
vdsPartial.setStaticData(DbFacade.getInstance().getVdsStaticDao().get(vdsId));
Line 355:         
vdsPartial.setDynamicData(DbFacade.getInstance().getVdsDynamicDao().get(vdsId));
Line 356: 
Line 357:         // TODO: A future patch will load this from cache
Line 358:         VDSGroup group = 
DbFacade.getInstance().getVdsGroupDao().get(vdsPartial.getVdsGroupId());
You replaced a single DB call with three calls just to save the join with 
statistics and VdsSpmId - this is no way to go.

Why not create a minimalistic view and query from it (or have another procedure 
that just has the minimal join)?
Line 359:         
vdsPartial.setVdsGroupCompatibilityVersion(group.getcompatibility_version());
Line 360:         vdsPartial.setVdsGroupCpuName(group.getcpu_name());
Line 361:         vdsPartial.setVdsGroupDescription(group.getdescription());
Line 362:         vdsPartial.setVdsGroupName(group.getName());


-- 
To view, visit http://gerrit.ovirt.org/21662
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7d72c21f1686c4031607d793bbbefcc3e45e98cb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to