beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Neubauer (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BEAM-3572) Reduce inefficient allocations in coders
Date Tue, 30 Jan 2018 21:56:00 GMT

     [ https://issues.apache.org/jira/browse/BEAM-3572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Bill Neubauer updated BEAM-3572:
--------------------------------
    Description: BufferedElementCountingOutputStream's constructor allocates a new buffer
to wrap the input OutputStream. This gets called on each invocation of encode() from IterableLikeCoder.
Since Coder is designed to be stateless, but this buffer holds state and isn't threadsafe,
we can't just have the caller manage the buffer. Modifying the constructor to use a pool of
buffers to reduce the number of allocations will help performance.  (was: BufferedElementCountingOutputStream's
constructor allocates a new buffer to wrap the input OutputStream. This gets called on each
invocation of encode() from IterableLikeCoder. Since Coder is designed to be stateless, but
this coder holds state and isn't threadsafe, we can't just have the caller 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 encode() from IterableLikeCoder.
Since Coder is designed to be stateless, but this buffer holds state and isn't threadsafe,
we can't just have the caller 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)

Mime
View raw message