[
https://issues.apache.org/jira/browse/DEFT-185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Séven Le Mesle resolved DEFT-185.
---------------------------------
Resolution: Fixed
waiting for review
> Use FileChannel.transferTo() instead of MappedByteBuffer
> --------------------------------------------------------
>
> Key: DEFT-185
> URL: https://issues.apache.org/jira/browse/DEFT-185
> Project: Deft
> Issue Type: New Feature
> Components: Core
> Affects Versions: 0.4.0
> Reporter: Séven Le Mesle
> Assignee: Séven Le Mesle
> Fix For: 0.4.0
>
>
> Using a MappedByteBuffer to deliver static content is not good as we can not
> use kernel sendFile directive when available.
> The FileChannel.transferTo() allows for such a feature and would be far
> better. Even notice that MappedByteBuffer is memory consuming, with
> transferTo() on his side is light and efficient (no buffers involved for many
> OS).
> The only backside is that we need to take great care of the opened files !
> Work would be to replace MBB stuff with the transferTo call and store a
> FileInputStream as key attachment, the underlying FileChannel can be used to
> maintain position.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira