Yevgeny Zaspitsky has posted comments on this change.

Change subject: core: performance improvement
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/25940/5/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/MacAddressRangeUtils.java
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/MacAddressRangeUtils.java:

Line 32:             return Collections.emptyList();
Line 33:         }
Line 34: 
Line 35:         // Initialize ArrayList for all potential records. (ignore 
that there need not be that many records.
Line 36:         List<String> macAddresses = new 
ArrayList<>(Math.min(stopAfter, (int)(endNum - startNum)));
> well, I tried to say, that LinkedList consumes MORE memory --> for each rec
Sorry, it's my fault. I've misunderstood the list usage. You can revert it back 
to ArrayList version if you wish.

It's unlikely that the result would be much smaller than its initial size (a 
lot of multicast ). Thus you might consider returning the List as is, otherwise 
in most cases twice memory size will be allocated.
Line 37:         for (long i = startNum; i <= endNum; i++) {
Line 38:             if ((MAC_ADDRESS_MULTICAST_BIT & i) != 0) {
Line 39:                 continue;
Line 40:             }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I09f87ebd1ea17d09a974ce6ca3e26bd2454a72fc
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <[email protected]>
Gerrit-Reviewer: Martin Mucha <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yevgeny Zaspitsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to