Michael Pasternak has posted comments on this change.

Change subject: cli: add the option to retrieve partial history using 
CLI(#957499)
......................................................................


Patch Set 8:

(1 comment)

....................................................
File src/ovirtcli/command/history.py
Line 105:         val = options[key]
Line 106: 
Line 107:         history = context.history.list()
Line 108:         if history:
Line 109:             history_len = len(history)
why not just calling history.length()? [1] that you did ^ is very expensive 
operation as it reads all lines from the file.

[1] history = context.history.list()
Line 110:             slide_len = int(val)
Line 111:             try:
Line 112:                 if prop == 'last':
Line 113:                     self.printHistoryBetweenIndexes(max(0, 
history_len - slide_len), history_len)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2321ccc7e3cce2521e0b86f67de2797a8a2b4276
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine-cli
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to