From commits-return-57472-archive-asf-public=cust-asf.ponee.io@beam.apache.org Tue Jan 30 22:56:05 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 834C318061A for ; Tue, 30 Jan 2018 22:56:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 71C3F160C2A; Tue, 30 Jan 2018 21:56:05 +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 C2D62160C54 for ; Tue, 30 Jan 2018 22:56:04 +0100 (CET) Received: (qmail 29618 invoked by uid 500); 30 Jan 2018 21:56:03 -0000 Mailing-List: contact commits-help@beam.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.apache.org Delivered-To: mailing list commits@beam.apache.org Received: (qmail 29607 invoked by uid 99); 30 Jan 2018 21:56:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jan 2018 21:56:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5816CD5792 for ; Tue, 30 Jan 2018 21:56:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id DP6e4Fd13GLY for ; Tue, 30 Jan 2018 21:56:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 2DCB55F19D for ; Tue, 30 Jan 2018 21:56:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6D568E0144 for ; Tue, 30 Jan 2018 21:56:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2D04621301 for ; Tue, 30 Jan 2018 21:56:00 +0000 (UTC) Date: Tue, 30 Jan 2018 21:56:00 +0000 (UTC) From: "Bill Neubauer (JIRA)" To: commits@beam.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (BEAM-3572) Reduce inefficient allocations in coders MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BEAM-3572?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Bill Neubauer updated BEAM-3572: -------------------------------- Description: BufferedElementCountingOutputStream's constructor allocate= s a new buffer to wrap the input OutputStream. This gets called on each inv= ocation of encode() from IterableLikeCoder. Since Coder is designed to be s= tateless, but this=C2=A0buffer holds state and isn't threadsafe, we can't j= ust have the caller manage the buffer. Modifying the constructor to use a p= ool of buffers to reduce the number of allocations will help performance. = (was: BufferedElementCountingOutputStream's constructor allocates a new buf= fer to wrap the input OutputStream. This gets called on each invocation of = encode() from IterableLikeCoder. Since Coder is designed to be stateless, b= ut this coder holds state and isn't threadsafe, we can't just have the call= er manage the buffer. Modifying the constructor to use a pool of buffers to= reduce the number of allocations will help performance.) > Reduce inefficient allocations in coders > ---------------------------------------- > > Key: BEAM-3572 > URL: https://issues.apache.org/jira/browse/BEAM-3572 > Project: Beam > Issue Type: Improvement > Components: sdk-java-core > Reporter: Bill Neubauer > Assignee: Bill Neubauer > Priority: Minor > Original Estimate: 24h > Remaining Estimate: 24h > > BufferedElementCountingOutputStream's constructor allocates a new buffer = to wrap the input OutputStream. This gets called on each invocation of enco= de() from IterableLikeCoder. Since Coder is designed to be stateless, but t= his=C2=A0buffer holds state and isn't threadsafe, we can't just have the ca= ller manage the buffer. Modifying the constructor to use a pool of buffers = to reduce the number of allocations will help performance. -- This message was sent by Atlassian JIRA (v7.6.3#76005)