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

performance bug in tokenstream.end()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 5.5.5, 6.2, 7.0
    • None
    • None
    • New

    Description

      TokenStream.end() calls getAttribute(), which is pretty costly to do per-stream.

      It does its current hack, because in the ctor of TokenStream is "too early".

      Instead, we can just add a variant of clear(), called end() to AttributeImpl. For most attributes it defers to clear, but for PosIncAtt it can handle the special case.

      Attachments

        1. LUCENE-7419.patch
          4 kB
          Robert Muir

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: