Uploaded image for project: 'Parquet'
  1. Parquet
  2. PARQUET-186

Poor performance in SnappyCodec because of string concat in tight loop

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.6.0
    • Component/s: parquet-mr
    • Labels:
      None

      Description

      String concatenation for SnappyUtil.validateBuffer which is called in a tight
      loop from both compress/decompress.

      This shows up as taking 60% of time in the profiler

        public static void validateBuffer(byte[] buffer, int off, int len) {
          Preconditions.checkNotNull(buffer, "buffer");
          Preconditions.checkArgument(off >= 0 && len >= 0 && off <= buffer.length - len,
              "Invalid offset or length. Out of buffer bounds. buffer.length=" + buffer.length
              + " off=" + off + " len=" + len);
        }
      

        Attachments

          Activity

            People

            • Assignee:
              rdblue Ryan Blue
              Reporter:
              copris Cristian Opris
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: