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

Speed up geometry queries by specialising Component2D spatial operations

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.6
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This is a follow-up from an observation of Adrien Grand where it notice that regardless of the spatial operation we are executing (e.g Intersects), we are always calling the method component2D#relateTriangle which it would be less expensive if we have an specialise method for intersects.

      The other frustrating thing is that regardless of the type of triangle we are dealing with, we are decoding all points of the triangle. In addicting most of the implementation of component2D#relateTriangle contain code that check the type of triangle to then call specialise methods.

      In this issue it is proposed to replace the method component2D#relateTriangle by the following methods:

      component2D#intersectsTriangle
      component2D#intersectsLine
      component2D#containsTriangle
      component2D#containsLine

      For consistency we add as well the methods:

      component2D#withinPoint
      component2D#withinLine

      Finally, the resolution of the triangle type his added to the decoding of the triangle.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ivera Ignacio Vera
                Reporter:
                ivera Ignacio Vera
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m