From 66b26fdbeb5cf5ebc028c6f1fbffd2786ff72025 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Mon, 8 Dec 2014 09:44:52 +0100 Subject: [PATCH] Replace arraylist by hashset in filter, which should improve better --- .../com/google/gwt/query/client/impl/SelectorEngine.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java index 6b6d5921..78b69e3e 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngine.java @@ -17,8 +17,7 @@ package com.google.gwt.query.client.impl; import static com.google.gwt.query.client.GQuery.*; -import java.util.ArrayList; -import java.util.List; +import java.util.HashSet; import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.Document; @@ -178,8 +177,8 @@ public class SelectorEngine implements HasSelector { return res; } Element ghostParent = null; - ArrayList parents = new ArrayList(); - List elmList = new ArrayList(); + HashSet parents = new HashSet(); + HashSet elmList = new HashSet(); for (int i = 0, l = nodes.getLength(); i < l; i++) { Node e = nodes.getItem(i); if (e == window || e == document || e.getNodeName() == null || "html".equalsIgnoreCase(e.getNodeName())) { -- 2.39.5