Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-340

TaggedDocument.saveToAbstract is expensive even when no abstracts enabled

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1
    • Component/s: .indexing
    • Labels:
      None

      Description

      saveToAbstract() is invoked for every token in the collection. Hence, it invokes an upper-casing of the tag name for every single token. (a) could this be done less often, (b) can we short circuit out of this method if there are no abstract tags.

        Attachments

          Activity

          craigm Craig Macdonald created issue -
          Hide
          richardm Richard McCreadie added a comment -

          Committed fix in 64ac7c07. TestTaggedDocument unit test passes.

          Now checks a boolean to see whether to consider abstracts. Only upper cases once (on new tag detection). Added map lookup on the tag name.

          Show
          richardm Richard McCreadie added a comment - Committed fix in 64ac7c07. TestTaggedDocument unit test passes. Now checks a boolean to see whether to consider abstracts. Only upper cases once (on new tag detection). Added map lookup on the tag name.
          richardm Richard McCreadie made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              richardm Richard McCreadie
              Reporter:
              craigm Craig Macdonald
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: