Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1927

DocBuilder Inefficiency

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Duplicate
    • Affects Version/s: 1.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      I am looking into collectDelta method in DocBuilder.java and I noticed that
      to determine the deltaRemoveSet it currently loops through the whole
      deltaSet for each deleted row.

      Does anyone else agree with the fact that this is quite inefficient?

      For delta-imports with a large deltaSet and deletedSet I found a
      considerable improvement in speed if we just save all deleted keys in a set.
      Then we just have to loop through the deltaSet once to determine which rows
      should be removed by checking if the deleted key set contains the delta row
      key.

        Attachments

        1. SOLR-1927.patch
          2 kB
          Robert Zotter

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rzotter Robert Zotter
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: