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

Scott O'Bryan edited comment on TRINIDAD-2046 at 3/1/11 7:11 PM:
-----------------------------------------------------------------

Very cool.  Thanks for testing that..  Good improvement.  

So I guess my next question is, does this have more to do with the max size of 
the buffer?  For instance, if I made a hard-coded 4K Buffer, would that be just 
as fast as a creating one of arbitrary size UP TO 4K.  The reason I ask is that 
it seems to me that you would want the max buffer size to be configurable and 
that the purposes of allocating smaller buffers was so as to take up too much 
memory for smaller resources.  Does this sound about right?

      was (Author: darkarena):
    Very cool.  Thanks for testing that..  Good improvement.  

So I guess my next question is, does this have more to do with the max size of 
the buffer?  For instance, if I made a hard-coded 4096 Buffer, would that be 
just as fast as a creating one of arbitrary size UP TO 4096K.  The reason I ask 
is that it seems to me that you would want the max buffer size to be 
configurable and that the purposes of allocating smaller buffers was so as to 
take up too much memory for smaller resources.  Does this sound about right?
  
> Copying data from inputStream to OuputStream needs appropriate buffer size
> --------------------------------------------------------------------------
>
>                 Key: TRINIDAD-2046
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2046
>             Project: MyFaces Trinidad
>          Issue Type: Improvement
>          Components: Components
>    Affects Versions: 1.2.14-core , 2.0.0-beta-2
>            Reporter: Xiaoming Shi
>              Labels: performance
>
> In the files 
> ./trinidad-1.2.14/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/FileSystemImageCache.java
>    line:955    
> ./trinidad-1.2.14/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/painter/ImageUtils.java
>                 line:303           
> The buffer size is fixed as 1024 bytes. With the size of the data varies, the 
> performance can be damaged a lot.
> We need an appropriate buffer size which depends on the size of the data to 
> be copied.
> This is the same as the Appache Bug 
> (https://issues.apache.org/bugzilla/show_bug.cgi?id=32546)

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to