Skip validation for stored geometry if a 2dsphere index exists

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 3.1.7
    • Affects Version/s: 2.7.6
    • Component/s: Geo
    • None
    • Fully Compatible
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Kevin Albertson
            Reporter:
            Siyuan Zhou
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: