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

Tommaso Teofili commented on SLING-5730:
----------------------------------------

bq. Do you have an idea of the minimum dimension for package streams in order 
to be dumped on FS, rather than in memory?

I think that only really small payloads should be dumped in memory, say below 
128KB. However such a number is not driven by data, it may be worth exporting 
some packages from a real life instance and extract some numbers like average 
payload size in order to find the best threshold.
Also it'd be good if it could be configurable.

bq. I was thinking about using a direct ByteBuffer for this task, would it be 
OK or there are side effects?

sure, I am not aware of any possible side effects.

> Avoid creating a File of a package when it's small enough to fit in memory
> --------------------------------------------------------------------------
>
>                 Key: SLING-5730
>                 URL: https://issues.apache.org/jira/browse/SLING-5730
>             Project: Sling
>          Issue Type: Improvement
>          Components: Distribution
>            Reporter: Tommaso Teofili
>            Assignee: Simone Tripodi
>
> {{ResourcePackageBuilder}} creates a temporary file holding the actual 
> package stream, it'd be good to avoid that when the size of the stream is 
> small enough to quickly fit into memory.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to