From commits-return-25609-apmail-commons-commits-archive=commons.apache.org@commons.apache.org Fri Mar 2 20:44:58 2012 Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 752C89F92 for ; Fri, 2 Mar 2012 20:44:58 +0000 (UTC) Received: (qmail 68206 invoked by uid 500); 2 Mar 2012 20:44:58 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 67996 invoked by uid 500); 2 Mar 2012 20:44:58 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 67986 invoked by uid 99); 2 Mar 2012 20:44:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2012 20:44:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2012 20:44:56 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A42C023889B3 for ; Fri, 2 Mar 2012 20:44:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1296445 - in /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model: BaseGraph.java DirectedMutableGraph.java InMemoryPath.java Date: Fri, 02 Mar 2012 20:44:36 -0000 To: commits@commons.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120302204436.A42C023889B3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: simonetripodi Date: Fri Mar 2 20:44:36 2012 New Revision: 1296445 URL: http://svn.apache.org/viewvc?rev=1296445&view=rev Log: rolled back r1296087 that caused incredible decrease of performances Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseGraph.java commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/DirectedMutableGraph.java commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseGraph.java URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseGraph.java?rev=1296445&r1=1296444&r2=1296445&view=diff ============================================================================== --- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseGraph.java (original) +++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/BaseGraph.java Fri Mar 2 20:44:36 2012 @@ -20,13 +20,13 @@ package org.apache.commons.graph.model; */ import static java.lang.String.format; -import static java.util.Collections.newSetFromMap; import static java.util.Collections.unmodifiableCollection; import static java.util.Collections.unmodifiableSet; +import java.util.HashMap; +import java.util.HashSet; import java.util.Map; import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.graph.Edge; import org.apache.commons.graph.Graph; @@ -47,13 +47,13 @@ public abstract class BaseGraph> adjacencyList = new ConcurrentHashMap>(); + private final Map> adjacencyList = new HashMap>(); - private final Set allEdges = newSetFromMap( new ConcurrentHashMap() ); + private final Set allEdges = new HashSet(); - private final Map, E> indexedEdges = new ConcurrentHashMap, E>(); + private final Map, E> indexedEdges = new HashMap, E>(); - private final Map> indexedVertices = new ConcurrentHashMap>(); + private final Map> indexedVertices = new HashMap>(); /** * {@inheritDoc} @@ -123,7 +123,7 @@ public abstract class BaseGraph> inbound = new ConcurrentHashMap>(); + private final Map> inbound = new HashMap>(); - private final Map> outbound = new ConcurrentHashMap>(); + private final Map> outbound = new HashMap>(); /** * {@inheritDoc} Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java?rev=1296445&r1=1296444&r2=1296445&view=diff ============================================================================== --- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java (original) +++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java Fri Mar 2 20:44:36 2012 @@ -19,16 +19,16 @@ package org.apache.commons.graph.model; * under the License. */ -import static java.lang.String.format; +import static org.apache.commons.graph.utils.Assertions.*; + import static java.util.Arrays.asList; +import static java.lang.String.format; import static java.util.Collections.unmodifiableList; -import static org.apache.commons.graph.utils.Assertions.checkArgument; -import static org.apache.commons.graph.utils.Assertions.checkNotNull; +import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.graph.Edge; import org.apache.commons.graph.Path; @@ -56,11 +56,11 @@ public class InMemoryPath edges = new LinkedList(); - private final Map successors = new ConcurrentHashMap(); + private final Map successors = new HashMap(); - private final Map, E> indexedEdges = new ConcurrentHashMap, E>(); + private final Map, E> indexedEdges = new HashMap, E>(); - private final Map> indexedVertices = new ConcurrentHashMap>(); + private final Map> indexedVertices = new HashMap>(); public InMemoryPath( V start, V target ) { @@ -211,7 +211,7 @@ public class InMemoryPath