Change in ovirt-engine[master]: webadmin: Don't use Linq#cast in TemplateStorageListModel

Code Review gerrit at ovirt.org
Thu Apr 13 13:25:30 UTC 2017


>From Allon Mureinik <amureini at redhat.com>:

Allon Mureinik has submitted this change and it was merged.

Change subject: webadmin: Don't use Linq#cast in TemplateStorageListModel
......................................................................


webadmin: Don't use Linq#cast in TemplateStorageListModel

Linq#cast redundantly creates a new ArrayList with the same objects
as the source collection has. This is, at best, an O(n) operation and
usually even worse, as the ArrayList's internal array needs to be
reallocated several times.

This patch removes the calls to Linq#cast in TemplateStorageListModel
and replaces them with explicit casts per element of the source
collection where needed.

Change-Id: Id441a97c601229a0abd0a7f61b8d2ff4c66437dc
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateStorageListModel.java
1 file changed, 14 insertions(+), 14 deletions(-)

Approvals:
  Tal Nisan: Verified; Looks good to me, approved
  Jenkins CI: Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/75501
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id441a97c601229a0abd0a7f61b8d2ff4c66437dc
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list