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

Julian Reschke commented on OAK-8489:
-------------------------------------

Probably.

There's a tension between making things generic, and optimizing for specific 
cases... Here it seems we are wasting time and memory to create documents we 
don't need.

I think there's another issue to reduce the number of DocumentStore calls for 
common operations. Maybe we should expand that to also consider coming up with 
optimized APIs. But then, only optimize the cases that need optimization...


> Reduce memory usage of in-memory commit
> ---------------------------------------
>
>                 Key: OAK-8489
>                 URL: https://issues.apache.org/jira/browse/OAK-8489
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: documentmk
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
>            Priority: Minor
>             Fix For: 1.16.0
>
>
> The memory usage of an in-memory commit currently depends on the number of 
> modified nodes and the structure of modified documents. The first is limited 
> by the updateLimit on the DocumentNodeStateBuilder. When the updateLimit is 
> reached, the changes are pushed to a branch. The structure of the modified 
> documents comes into play, when those documents have a rather high memory 
> usage. The current commit implementation performs the update in a single call 
> to {{DocumentStore.createOrUpdate()}}, which has a return type of 
> {{List<Document>}}. The returned list contains the documents as they looked 
> before the update. With a default of 100'000 as the updateLimit and heavy 
> weight modified Documents, this can result in a high memory usage.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to