Return-Path: X-Original-To: apmail-zest-dev-archive@minotaur.apache.org Delivered-To: apmail-zest-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 87F4217CE0 for ; Fri, 4 Sep 2015 13:02:13 +0000 (UTC) Received: (qmail 97007 invoked by uid 500); 4 Sep 2015 13:02:13 -0000 Delivered-To: apmail-zest-dev-archive@zest.apache.org Received: (qmail 96967 invoked by uid 500); 4 Sep 2015 13:02:13 -0000 Mailing-List: contact dev-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list dev@zest.apache.org Received: (qmail 96955 invoked by uid 99); 4 Sep 2015 13:02:13 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Sep 2015 13:02:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B015218034C for ; Fri, 4 Sep 2015 13:02:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.12 X-Spam-Level: X-Spam-Status: No, score=-0.12 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 35FZMMjD37Vi for ; Fri, 4 Sep 2015 13:02:05 +0000 (UTC) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com [209.85.215.43]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 4779020FE8 for ; Fri, 4 Sep 2015 13:02:05 +0000 (UTC) Received: by laeb10 with SMTP id b10so13141165lae.1 for ; Fri, 04 Sep 2015 06:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=PFMMmDpJT25ZMvbGbdEvPVhYcccOgIgUufRbtAC7UGU=; b=nevk1Grh78Gnk+wFz/PpZ1AIQQ3kzrxsEnNoajS1Hn1XN91AiLoFasEUsq+u/E5CIQ UjYRYlD6SZBg0RVfeYl/2E2+CvmYNPvODSWQltgjsEpEY1UBlncBDhK9sJi52uZSt1We T7A8iyNBou7IfYlGVCzWmaquf36M593B2SZlLV/eUGNO8Xe1cBb5gLdE/CQ2cbRcbJ2C BuetbXjIN1SPu5q1F9C9+UiHTwlC7dUf6D+un34qXKfYcJVFushkkOKFVPw5KdBqNo95 k08AbjIbkxDG5OvTYOCGCwVQwmauGDTJep7x1DDN8Yw74ffxduT8rVeqmGQTlbij6/Y8 YxRg== X-Received: by 10.112.13.166 with SMTP id i6mr3596586lbc.50.1441371723893; Fri, 04 Sep 2015 06:02:03 -0700 (PDT) Received: from [192.168.0.134] ([87.51.7.222]) by smtp.googlemail.com with ESMTPSA id p9sm557467laj.45.2015.09.04.06.02.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Sep 2015 06:02:03 -0700 (PDT) Subject: Re: Stream creation... To: dev@zest.apache.org References: From: =?UTF-8?Q?Kent_S=c3=b8lvsten?= Message-ID: <55E9964D.2000606@gmail.com> Date: Fri, 4 Sep 2015 15:02:05 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit It fixed a problem in an Aggregate test (don't recall the exact name of the test). My guess is that the previous version was streaming and removing concurrently - the new implementation finds all items that should be removed before starting the actual removal. /Kent Den 04-09-2015 kl. 14:01 skrev Niclas Hedhman: > I am also curious about this change; > > - ).distinct().forEach( unitOfWork::remove ); > + ).distinct().collect( Collectors.toList() ).stream().forEach( > unitOfWork::remove ); > > From my understanding it is the same thing (except slower). Do you recall > what this is about? > > > On Fri, Sep 4, 2015 at 7:56 PM, Niclas Hedhman wrote: > >> Kent, >> while reviewing, I saw >> >> Arrays.asList( type ).stream() >> >> This can more efficiently be written as >> >> Stream.of( type ) >> >> Cheers >> -- >> Niclas Hedhman, Software Developer >> http://zest.apache.org - New Energy for Java >> > >