Uploaded image for project: 'Commons CSV'
  1. Commons CSV
  2. CSV-18

CharBuffer is too slow.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      It's too slow reading large field(about 10000 over) because of org.apache.commons.csv.CharBuffer.
      Change provideCapacity method to below or copy-paste org.apache.commons.collections.primitives.ArrayCharList.

      public void provideCapacity(final int capacity)

      { if (c.length >= capacity) return; int newcapacity = capacity * 3 / 2 + 1; char[] newc = new char[newcapacity]; System.arraycopy(c, 0, newc, 0, length); c = newc; }

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              miyabe MIYABE Tatsuhiko
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: