db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3791) Excessive memory usage when fetching small Clobs
Date Fri, 25 Jul 2008 09:23:31 GMT

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

Kristian Waagan updated DERBY-3791:

    Attachment: derby-3791-1a-buffer_fix.diff

'derby-3791-1a-buffer_fix.diff' makes UTF8Reader allocate a smaller buffer if possible.
The following alternatives are considered (if possible):
 - length of the byte stream (if available)
 - the maximum allowed length for the field (if set)
 - the maximum size of the buffer

In addition, the buffering of the internal stream is removed because it is already buffered
at lower levels.

Note that the buffer can still be too large because we get information about the size in number
of bytes. Since we don't know how many chars we get from the number of bytes, I decided to
assume one char per byte. The patch will improve the situation for small streams anyway. For
larger streams, the maximum buffer size will be used (8 KB).

suites.All passed.
Patch ready for review.

> Excessive memory usage when fetching small Clobs
> ------------------------------------------------
>                 Key: DERBY-3791
>                 URL: https://issues.apache.org/jira/browse/DERBY-3791
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions:,,,
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3791-1a-buffer_fix.diff
> When investigating DERBY-3312 I found out that performance with the embedded driver has
decreased a lot as well.
> Analysis on trunk indicate excessive memory usage, causing high allocation and garbage
collection costs.
> I believe there was another major performance problem in 10.3, but it appears fixed in
trunk. I have not spent time identifying this problem.

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

View raw message