Arik Hadas has posted comments on this change.

Change subject: core: add graphics device to management classes
......................................................................


Patch Set 33:

(1 comment)

http://gerrit.ovirt.org/#/c/28567/33/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java:

Line 343:                 }
Line 344:             }
Line 345:         }
Line 346: 
Line 347:         return cachedGraphics.get(type);
I thought about different caching, something like:

private graphicsDevices franta() {
   if (!<cached>) {
     <get from the DB and set to cache>
   }
   return <cached>
}

and then in getGraphicsDevOfType do:
List<GraphicsDevice> graphicsDevices = franta()
instead of:
List<GraphicsDevice> graphicsDevices = query.getReturnValue();

that way we'll access the DB just one, instead of once-per GraphicsType
Line 348:     }
Line 349: 
Line 350:     protected void updateVmPayload() {
Line 351:         VmDeviceDAO dao = getVmDeviceDao();


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I39c84ce94cd3cb52286c52d765a389e69c9b0e62
Gerrit-PatchSet: 33
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
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