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

Olabusayo Kilo commented on DAFFODIL-2427:
------------------------------------------

For c38a551f353aed53479c60d38c4929743f82daf7, we instead decided to leave the 
ABQ depth of the coroutine at 1 to ensure no concurrency between producer  
(DaffodilUnparseContentHandler) and consumer (SAXInfosetInputter) and instead 
updated the coroutine to allow any generic type. We then pass an array of 
preallocated events between the producer/consumer (via the coroutine), copying 
new events into the arrays during the produce step and clearing them during the 
consume step.

We also added a saxUnparseEventBatchSize tunable that can be used to adjust the 
batch size depending on the memory constraints of the environment. Lower batch 
sizes result in more context switching (which is quite expensive), but has a 
smaller memory footprint. Higher batch sizes result in less context switching , 
but has a larger memory footprint. 

> Batch SAX Unparse Coroutine Events 
> -----------------------------------
>
>                 Key: DAFFODIL-2427
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2427
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: API, Performance, SAX
>    Affects Versions: 3.0.0
>            Reporter: Olabusayo Kilo
>            Assignee: Olabusayo Kilo
>            Priority: Major
>             Fix For: 3.1.0
>
>
> Start with 100 for the ArrayBlockingQueue depth, to see if there is 
> improvement.
> - udpdates with need to be made on the SAXInfosetInputter, as well as the 
> DaffodilUnparseContentHandler side to ensure the n for the ABQ is respected 
> by both sides.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to