[ 
https://issues.apache.org/jira/browse/DERBY-3825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kristian Waagan updated DERBY-3825:
-----------------------------------

    Attachment: derby-3825-2b-internalReader_repositioning.diff

Patch 2b addresses the following:
 - added license to UTF8ReaderTest
 - changed class comment in UTF8ReaderTest
 - added DEBUG block with detailed EOFException

Regarding Knut Anders' comments (from top to bottom):
 - Thanks for looking at the repositioning logic. It is a bit complex, but it 
should be pretty well tested functionally. Can it be optimized?
 - Regarding the poor performance you observed, I need to look into it. I will 
create a new Jira for it. Implementing getInternalReader is one issue, but I 
think there are more severe problems in this code path (it is using some 
special reader objects). Hopefully the ClobAccessTest should demonstrate the 
problem.
 - I resolved the localization issue by throwing a detailed EOFException from 
inside a debug block. I chose this over an assert, as an assert makes a test 
fail (expects EOFException).
 - I changed the comment, it was not very precise. I need a package-private 
test because of StoreStreamClob, which is the only user of 
UTF8Reader.reposition at the moment and I wanted a little bit more control than 
what I get going through the JDBC API.

Thanks for looking at the patch!
Unless there are more comments on patch 2b, I expect to commit it shortly.

> StoreStreamClob.getReader(charPos) performs poorly
> --------------------------------------------------
>
>                 Key: DERBY-3825
>                 URL: https://issues.apache.org/jira/browse/DERBY-3825
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC, Store
>    Affects Versions: 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>         Attachments: derby-3825-0a-preview.diff, 
> derby-3825-1a-reset_readpositioninbuffer.diff, 
> derby-3825-2a-internalReader_repositioning.diff, 
> derby-3825-2a-internalReader_repositioning.stat, 
> derby-3825-2b-internalReader_repositioning.diff
>
>
> StoreStreamClob.getReader(charPos) performs poorly because it resets the 
> underlying stream and skips data until it reached the requested character 
> position. Not only does the data has to be skipped, it also has to be decoded 
> (UTF-8).
> The problem is exposed through EmbedClob.getSubString, which causes extremely 
> bad performance for the client driver because the locator based Clob 
> implementation uses this method.
> For the record, there is another read buffer size issue that exaggerates the 
> problem (it will probably be handled under DERBY-3769, and also DERBY-3818).

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

Reply via email to