From issues-return-5419-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Tue Nov 26 09:18:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 82873180674 for ; Tue, 26 Nov 2019 10:18:02 +0100 (CET) Received: (qmail 43848 invoked by uid 500); 26 Nov 2019 09:18:01 -0000 Mailing-List: contact issues-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list issues@lucene.apache.org Received: (qmail 43815 invoked by uid 99); 26 Nov 2019 09:18:01 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Nov 2019 09:18:01 +0000 From: GitBox To: issues@lucene.apache.org Subject: [GitHub] [lucene-solr] dweiss commented on a change in pull request #1031: LUCENE-9059: Reduce garbage created by ByteBuffersDataOutput. Message-ID: <157475988166.7483.8914617114063821576.gitbox@gitbox.apache.org> Date: Tue, 26 Nov 2019 09:18:01 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit dweiss commented on a change in pull request #1031: LUCENE-9059: Reduce garbage created by ByteBuffersDataOutput. URL: https://github.com/apache/lucene-solr/pull/1031#discussion_r350618719 ########## File path: lucene/core/src/java/org/apache/lucene/store/ByteBuffersDataOutput.java ########## @@ -412,7 +413,11 @@ public long ramBytesUsed() { * lead to hard-to-debug issues, use with great care. */ public void reset() { - blocks.stream().forEach(blockReuse); + if (blockReuse != NO_REUSE) { Review comment: That .stream() call is actually not necessary there -- you could just pass a closure to blocks.forEach... This should be pretty much equivalent to having a for loop. I don't mind switching to more verbose format, I just wanted be hip and groovy with streams... ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org For additional commands, e-mail: issues-help@lucene.apache.org