[jira] Commented: (TRINIDAD-2046) Copying data from inputStream to OuputStream needs appropriate buffer size

2011-03-01 Thread Xiaoming Shi (JIRA)

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

Xiaoming Shi commented on TRINIDAD-2046:


Hi Scott,

The buffer size should increase as the size of content increases, Still a 
MAXIMUM_SIZE needed. We don't want it to create too large a buffer.

 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




[jira] Issue Comment Edited: (TRINIDAD-2046) Copying data from inputStream to OuputStream needs appropriate buffer size

2011-03-01 Thread Xiaoming Shi (JIRA)

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

Xiaoming Shi edited comment on TRINIDAD-2046 at 3/1/11 6:18 PM:


Hi Scott,

The buffer size should increase as the size of content increases, Still a 
MAXIMUM_SIZE needed. We don't want it to create too large a buffer.

BTW, we have done unit test, and find that,
to copy 1MB data,
it takes 7282622 nano seconds with a buffer size 4096
while it takes 11470883 nano seconds with a buffer size 1024
 

  was (Author: nancyesmis):
Hi Scott,

The buffer size should increase as the size of content increases, Still a 
MAXIMUM_SIZE needed. We don't want it to create too large a buffer.
  
 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




[jira] Commented: (TRINIDAD-2046) Copying data from inputStream to OuputStream needs appropriate buffer size

2011-03-01 Thread Xiaoming Shi (JIRA)

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

Xiaoming Shi commented on TRINIDAD-2046:


Yes :-)

For resources that are smaller than the MAX_BUFFER size, we can just allocate a 
buffer with the size of the resource. 

Here is the final patch of the parent bug: 
https://issues.apache.org/bugzilla/attachment.cgi?id=13689

 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




[jira] Commented: (TRINIDAD-2046) Copying data from inputStream to OuputStream needs appropriate buffer size

2011-03-01 Thread Xiaoming Shi (JIRA)

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

Xiaoming Shi commented on TRINIDAD-2046:


Hi Scott,

I'd like to, but currently I'm working on a paper deadline. I think I can take 
it, if no one has taken it after that :-)

 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




[jira] Created: (TRINIDAD-2046) Copying data from inputStream to OuputStream needs appropriate buffer size

2011-02-28 Thread Xiaoming Shi (JIRA)
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: Bug
  Components: Components
Affects Versions: 1.2.14-core 
Reporter: Xiaoming Shi


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