You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "Oleg Zhurakousky (JIRA)" <ji...@apache.org> on 2016/04/09 18:32:25 UTC
[jira] [Updated] (NIFI-1680) Improve StreamScanner performance
[ https://issues.apache.org/jira/browse/NIFI-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Zhurakousky updated NIFI-1680:
-----------------------------------
Summary: Improve StreamScanner performance (was: Consider usage of direct buffers and supporting components reuse when splitting content stream)
> Improve StreamScanner performance
> ---------------------------------
>
> Key: NIFI-1680
> URL: https://issues.apache.org/jira/browse/NIFI-1680
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Oleg Zhurakousky
> Assignee: Oleg Zhurakousky
>
> We have several use cases where a content of a single FlowFile is split within a single cycle (i.e., _onTrigger()_). An example is PutKafka.
> Such splitting involves parsing of a content InputStream into chunks represented as byte[]. Currently we are using custom buffer (_org.apache.nifi.stream.io.ByteArrayOutputStream_) to build byte[].
> There are several potential areas of improvement here:
> 1. For every cycle we are creating a new instance of _ByteArrayOutputStream_ which essentially reallocates the buffer used to build byte[].
> 2. The buffer itself is allocated on the heap
> 3. Similar to _ByteArrayOutputStream_, the _BufferedInputStream_ is also created for each cycle where with some customization it could be reused.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)