[
https://issues.apache.org/jira/browse/NIFI-9364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17438929#comment-17438929
]
ASF subversion and git services commented on NIFI-9364:
-------------------------------------------------------
Commit 373498445fe589e2d4855a0730fbb9127f0b4452 in nifi's branch
refs/heads/main from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=3734984 ]
NIFI-9364: Ensure that we delegate calls to write(byte[]) and write(byte[],
int, int) to the underlying OutputStream when writing to the file-based content
repository for stateless
Signed-off-by: Joe Gresock <[email protected]>
This closes #5508.
> ExecuteStateless performance suffers if using "Content Storage Strategy" of
> "Store Content on Disk"
> ---------------------------------------------------------------------------------------------------
>
> Key: NIFI-9364
> URL: https://issues.apache.org/jira/browse/NIFI-9364
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 1.15.0
> Reporter: Mark Payne
> Assignee: Mark Payne
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> When I tested performance of ExecuteStateless storing content on heap,
> performance was great. But I changed to store content on disk, expecting
> performance to drop some. But I saw a HUGE performance drop - about an order
> of magnitude. It appears to be because when copying the FlowFile content into
> the processor's Content Repository, the {{ContentOutputStream}} that is used
> to write content to disk does not override the parent {{FilterOutputStream's
> write(byte[], int offset, int len)}} method. Instead, it just inherit's the
> parent's implementation. The parent implementation performs horribly, calling
> {{void write(int b)}} for each byte in the given buffer. which means we write
> each byte to the underlying FileOutputStream as an individual operation.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)