db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r689803 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UTF8Reader.java
Date Thu, 28 Aug 2008 12:36:46 GMT
Author: kristwaa
Date: Thu Aug 28 05:36:44 2008
New Revision: 689803

URL: http://svn.apache.org/viewvc?rev=689803&view=rev
Log:
DERBY-3825: StoreStreamClob.getReader(charPos) performs poorly.
Small cleanup patch moving the resetting of readPositionInBuffer into fillBuffer.
Patch file: derby-3825-1a-reset_readpositioninbuffer.diff

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UTF8Reader.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UTF8Reader.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UTF8Reader.java?rev=689803&r1=689802&r2=689803&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UTF8Reader.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/UTF8Reader.java Thu Aug 28
05:36:44 2008
@@ -234,7 +234,6 @@
                 if (fillBuffer()) {
                     return -1;
                 }
-                readPositionInBuffer = 0;
             }
 
             return buffer[readPositionInBuffer++];
@@ -258,7 +257,6 @@
                 if (fillBuffer()) {
                     return -1;
                 }
-                readPositionInBuffer = 0;
             }
 
             int remainingInBuffer = charactersInBuffer - readPositionInBuffer;
@@ -297,7 +295,6 @@
                 if (fillBuffer()) {
                     return 0L;
                 }
-                readPositionInBuffer = 0;
             }
 
             int remainingInBuffer = charactersInBuffer - readPositionInBuffer;
@@ -348,7 +345,6 @@
                 if (fillBuffer()) {
                     return -1;
                 }
-                readPositionInBuffer = 0;
             }
 
             int remainingInBuffer = charactersInBuffer - readPositionInBuffer;
@@ -387,7 +383,6 @@
                 if (fillBuffer()) {
                     return -1;
                 }
-                readPositionInBuffer = 0;
             }
 
             int remainingInBuffer = charactersInBuffer - readPositionInBuffer;
@@ -456,6 +451,7 @@
             return true;
 
         charactersInBuffer = 0;
+        readPositionInBuffer = 0;
 
         try {
         try {



Mime
View raw message