Derby
  1. Derby
  2. DERBY-4661

Reduce size of encoding buffer for short character values

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor 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.

      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

        Kristian Waagan created issue -
        Kristian Waagan made changes -
        Field Original Value New Value
        Attachment derby-4661-1a-reduce_encoding_bz.diff [ 12444487 ]
        Attachment derby-4661-1a-reduce_encoding_bz.stat [ 12444488 ]
        Kristian Waagan made changes -
        Issue & fix info [Patch Available]
        Kristian Waagan made changes -
        Attachment derby-4661-1b-reduce_encoding_bz.diff [ 12445046 ]
        Kristian Waagan made changes -
        Attachment derby-4661-1b-reduce_encoding_bz.diff [ 12445462 ]
        Kristian Waagan made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Issue & fix info [Patch Available]
        Fix Version/s 10.7.0.0 [ 12314971 ]
        Resolution Fixed [ 1 ]
        Kristian Waagan made changes -
        Fix Version/s 10.5.3.1 [ 12314182 ]
        Fix Version/s 10.6.1.1 [ 12314973 ]
        Kristian Waagan made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Kathey Marsden made changes -
        Fix Version/s 10.6.2.0 [ 12315342 ]
        Fix Version/s 10.6.1.1 [ 12314973 ]
        Knut Anders Hatlen made changes -
        Fix Version/s 10.6.2.1 [ 12315343 ]
        Fix Version/s 10.6.2.0 [ 12315342 ]
        Rick Hillegas made changes -
        Affects Version/s 10.7.1.1 [ 12315564 ]
        Affects Version/s 10.7.1.0 [ 12314971 ]
        Fix Version/s 10.7.1.1 [ 12315564 ]
        Fix Version/s 10.7.1.0 [ 12314971 ]
        Gavin made changes -
        Workflow jira [ 12510887 ] Default workflow, editable Closed status [ 12800250 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development