Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15204

Skip validation for stored geometry if a 2dsphere index exists

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.7.6
    • Fix Version/s: 3.1.7
    • Component/s: Geo
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible

      Description

      When parsing a polygon, we always validate the geometries, like checking whether it's self-intersected among other sanity checks. (S2 already has optimizations for this rather than using the naive O(n^2) algorithm). The dependency graph given by CPU profiling shows this validation takes 80% of the running time for polygons with thousands vertices. If there is already an index on the geo field, this validation is guaranteed by the index, so we can skip it for stored geometries.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kevin.albertson Kevin Albertson
              Reporter:
              siyuan.zhou Siyuan Zhou
              Participants:
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: