Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-1125

Excessive Arrays.fill(0) in DocumentsWriter drastically slows down small docs (3.9X slowdown!)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      I've been doing some "final" performance testing of 2.3RC1 and
      uncovered a fairly serious bug that adds a large fixed CPU cost when
      documents have any term vector enabled fields.

      The bug does not affect correctness, just performance.

      Basically, for every document, we were calling Arrays.fill(0) on a
      large (32 KB) byte array when in fact we only needed to zero a small
      part of it. This only happens if term vectors are turned on, and is
      especially devastating for small documents.

        Attachments

        1. LUCENE-1125.patch
          2 kB
          Michael McCandless

          Activity

            People

            • Assignee:
              mikemccand Michael McCandless
              Reporter:
              mikemccand Michael McCandless
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: