Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E7985200D0F for ; Fri, 15 Sep 2017 06:28:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E5BEF1609CE; Fri, 15 Sep 2017 04:28:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2F4FE1609CD for ; Fri, 15 Sep 2017 06:28:11 +0200 (CEST) Received: (qmail 88716 invoked by uid 500); 15 Sep 2017 04:28:10 -0000 Mailing-List: contact dev-help@gearpump.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@gearpump.incubator.apache.org Delivered-To: mailing list dev@gearpump.incubator.apache.org Delivered-To: moderator for dev@gearpump.incubator.apache.org Received: (qmail 86599 invoked by uid 99); 15 Sep 2017 04:25:26 -0000 X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.02 X-Spam-Level: X-Spam-Status: No, score=-4.02 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled From: manuzhang To: dev@gearpump.incubator.apache.org Reply-To: dev@gearpump.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-gearpump pull request #223: [GEARPUMP-349] Optimize Graph topologi... Content-Type: text/plain Message-Id: <20170915042522.A949EF5593@git1-us-west.apache.org> Date: Fri, 15 Sep 2017 04:25:22 +0000 (UTC) archived-at: Fri, 15 Sep 2017 04:28:12 -0000 Github user manuzhang commented on a diff in the pull request: https://github.com/apache/incubator-gearpump/pull/223#discussion_r139061587 --- Diff: core/src/main/scala/org/apache/gearpump/util/Graph.scala --- @@ -243,13 +258,36 @@ class Graph[N, E](vertexList: List[N], edgeList: List[(N, E, N)]) extends Serial * The node returned by Iterator is stable sorted. */ def topologicalOrderIterator: Iterator[N] = { - val newGraph = copy - var output = List.empty[N] + tryTopologicalOrderIterator match { + case Success(intertor) => intertor --- End diff -- intertor ? ---