]> source.dussan.org Git - vaadin-framework.git/commit
Improve performance of Util.collectionEquals (#16968).
authorFabian Lange <lange.fabian@gmail.com>
Mon, 2 Mar 2015 11:16:19 +0000 (12:16 +0100)
committerArtur Signell <artur@vaadin.com>
Mon, 2 Mar 2015 19:51:33 +0000 (21:51 +0200)
commit05236b2c8d1908685ddbd0e71d2142202ad3bb09
tree9ea949354f5ef5e50a435a6b41f5d8aa6736269a
parentea9b7e0508e5c9e96edcd2f72699af29b705e361
Improve performance of Util.collectionEquals (#16968).

This change checks the length of both collections first before iterating
them. This massively speeds up the comparison in case the collections do
not have the same length.

Also in the case where the lengths are equal, this saves the
collection2.hasNext() checks.

Change-Id: If1325f3581d12bf742d77fbf8b0f89511fa11252
client/src/com/vaadin/client/Util.java