[ 
https://issues.apache.org/jira/browse/NIFI-9364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17458621#comment-17458621
 ] 

ASF subversion and git services commented on NIFI-9364:
-------------------------------------------------------

Commit 1682a806843bae2503d8969a7ed68d57a1e3795e in nifi's branch 
refs/heads/support/nifi-1.15 from Mark Payne
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=1682a80 ]

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


> 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
>             Fix For: 1.16.0, 1.15.1
>
>          Time Spent: 50m
>  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.20.1#820001)

Reply via email to