Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4661

Reduce size of encoding buffer for short character values

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.7.1.1
    • Fix Version/s: 10.5.3.1, 10.6.2.1, 10.7.1.1
    • Component/s: JDBC
    • Labels:
    • Environment:
      Inserts using setXStream(int, Reader/InputStream, int/long) for short values on character columns
    • Bug behavior facts:
      Performance

      Description

      When inserting character values Derby converts from Java char to an on-disk encoding of UTF-8. To to this, the user stream is read and the resulting bytes after conversion are placed in a "translation buffer". The default size of the buffer is 32 KB. When inserting a lot of short values, the pressure on the Java garbage collector is unnecessary high and the allocation/GC also causes a somewhat higher CPU usage.

      This effect of this issue can easily be reduced by sizing the buffer in the appropriate cases.

        Attachments

        1. derby-4661-1b-reduce_encoding_bz.diff
          8 kB
          Kristian Waagan
        2. derby-4661-1b-reduce_encoding_bz.diff
          8 kB
          Kristian Waagan
        3. derby-4661-1a-reduce_encoding_bz.stat
          0.4 kB
          Kristian Waagan
        4. derby-4661-1a-reduce_encoding_bz.diff
          5 kB
          Kristian Waagan

          Activity

            People

            • Assignee:
              kristwaa Kristian Waagan
              Reporter:
              kristwaa Kristian Waagan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: