Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
10.1.1.0, 10.1.2.1, 10.2.1.6
-
None
-
None
-
all
-
Performance
Description
Dan suggested this improvement here:
http://issues.apache.org/jira/browse/DERBY-463?page=comments#action_12356742
For org.apache.derby.client.am.ClobOutputStream#write(int), five objects are created for every byte written.
"In fact this class and the client Clob have code like this everywhere, as the Clob is updated:
clob_.string_ = clob_.string_.concat(new String(newByte));
clob_.asciiStream_ = new java.io.StringBufferInputStream(clob_.string_);
clob_.unicodeStream_ = new java.io.StringBufferInputStream(clob_.string_);
clob_.characterStream_ = new java.io.StringReader(clob_.string_);
Would probably be better to create most of those objects on demand, rather than on every modification. I mean if the CLOB is modified
but the application never retrieives the ascii or character streams, what was the benefit of creating them? "
________________
Also check the org.apache.derby.client.am.ClobWriter. Need to make this better and efficient.
Attachments
Issue Links
- is related to
-
DERBY-1256 Remove usage of non-portable methods in derby code
- Closed
-
DERBY-1615 Rewrite the Clob implementation in the client driver
- Closed