You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org> on 2005/11/05 03:10:19 UTC

[jira] Created: (DERBY-684) Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client

Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client 
--------------------------------------------------------------------------------------------

         Key: DERBY-684
         URL: http://issues.apache.org/jira/browse/DERBY-684
     Project: Derby
        Type: Improvement
  Components: Performance, Network Client  
    Versions: 10.2.0.0, 10.1.1.1, 10.1.1.0    
 Environment: all
    Reporter: Sunitha Kambhampati


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. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-684) Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-684:
---------------------------------

    Component/s: Newcomer

> Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-684
>                 URL: https://issues.apache.org/jira/browse/DERBY-684
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client, Newcomer, Performance
>    Affects Versions: 10.1.1.0, 10.1.2.1, 10.2.1.6
>         Environment: all
>            Reporter: Sunitha Kambhampati
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-684) Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649074#action_12649074 ] 

Dag H. Wanvik commented on DERBY-684:
-------------------------------------

+1 to close, linked it to DERBY-1256.

> Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-684
>                 URL: https://issues.apache.org/jira/browse/DERBY-684
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client, Newcomer, Performance
>    Affects Versions: 10.1.1.0, 10.1.2.1, 10.2.1.6
>         Environment: all
>            Reporter: Sunitha Kambhampati
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DERBY-684) Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren closed DERBY-684.
------------------------------------

    Resolution: Won't Fix

This code is now in an 'else' code path, with the if being the loblocator code, which does create relevant objects on demand. So, this code is only used when interfacing with older servers and it seems not cost-effective to change this anymore.

> Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-684
>                 URL: https://issues.apache.org/jira/browse/DERBY-684
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client, Newcomer, Performance
>    Affects Versions: 10.1.1.0, 10.1.2.1, 10.2.1.6
>         Environment: all
>            Reporter: Sunitha Kambhampati
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-684) Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648709#action_12648709 ] 

Myrna van Lunteren commented on DERBY-684:
------------------------------------------

I've looked at what's remaining of this code, and it appears to me it's only still used when interfacing with servers without loblocator support. 
Which means it'd be harder to test (only with cross-version server/client testing, which we currently don't do automated), and it'd be work that only would affect a small number of customers.

I suggest we close this issue - the improvement of making the streams on demand, rather than on write - with no fix intended.
(The StringBufferInputStream is listed, and should be viewed under, DERBY-1256, not under this section).

> Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-684
>                 URL: https://issues.apache.org/jira/browse/DERBY-684
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client, Newcomer, Performance
>    Affects Versions: 10.1.1.0, 10.1.2.1, 10.2.1.6
>         Environment: all
>            Reporter: Sunitha Kambhampati
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-684) Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-684?page=comments#action_12378981 ] 

Daniel John Debrunner commented on DERBY-684:
---------------------------------------------

Note that StringBufferInputStream is non-portable and should not be used. It will lead to different output on platforms with different default encoding, e.g. IBM z/os. See DERBY-1256

> Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client
> -------------------------------------------------------------------------------------------
>
>          Key: DERBY-684
>          URL: http://issues.apache.org/jira/browse/DERBY-684
>      Project: Derby
>         Type: Improvement

>   Components: Performance, Network Client
>     Versions: 10.2.0.0, 10.1.1.1, 10.1.1.0
>  Environment: all
>     Reporter: Sunitha Kambhampati

>
> 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. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-684) Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-684:
--------------------------------

    Derby Categories: [Performance]

> Improve performance of Clob objects (ClobOutputStream#write,ClobWriter#write) on the client
> -------------------------------------------------------------------------------------------
>
>                 Key: DERBY-684
>                 URL: https://issues.apache.org/jira/browse/DERBY-684
>             Project: Derby
>          Issue Type: Improvement
>          Components: Network Client
>    Affects Versions: 10.1.1.0, 10.1.2.1, 10.2.1.6
>         Environment: all
>            Reporter: Sunitha Kambhampati
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.