You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by sc...@apache.org on 2008/03/26 20:57:03 UTC

svn commit: r641527 - /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/BufferUtils.java

Author: scheu
Date: Wed Mar 26 12:57:01 2008
New Revision: 641527

URL: http://svn.apache.org/viewvc?rev=641527&view=rev
Log:
Quick Fix
Use a 4K buffer...this seems to be the best from a performance standpoint.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/BufferUtils.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/BufferUtils.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/BufferUtils.java?rev=641527&r1=641526&r2=641527&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/BufferUtils.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/BufferUtils.java Wed Mar 26 12:57:01 2008
@@ -33,7 +33,9 @@
  */
 public class BufferUtils {
     
-    static int BUFFER_LEN = 32 * 1024;         // Copy Buffer size
+    // Performance testing indicates that 4K is the best size for medium
+    // and small payloads.  And there is a neglible effect on large payloads.
+    static int BUFFER_LEN = 4 * 1024;         // Copy Buffer size
     static boolean ENABLE_FILE_CHANNEL = true;  // Enable file channel optimization 
     
     private static byte[] _cacheBuffer = new byte[BUFFER_LEN];



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org