Select to view content in your preferred language

GeometryEngine.Distance much slower since Pro 3.3

2117
10
Jump to solution
11-24-2025 02:24 PM
BillyBuerger
Frequent Contributor

I recently noticed that a process I developed using the Pro SDK and does a lot of geometry queries and updates was running much slower on Pro 3.3 compared to the same code running on Pro 3.1.  I found a similar performance issue when testing some tools on Pro 3.6 as well.  As I was reviewing where the tool was taking the most time, I found it was in the processes that do a lot of testing for distances between feature geometries.  Specifically the GeometryEngine.Distance method.  I did some testing and found that using a sample of 5,770 features and testing the distance to a MapPoint in Pro 3.1 completes in about 100ms.  This same code running on Pro 3.3 takes about 6 seconds.  That's 60x slower.  As noted, I also have a current Pro 3.6 system and the performance seems similar to 3.3 there but they are different systems so not apples to apples.  I then installed Pro 3.2.0 through 3.2.5 on the same system as the 3.1 and 3.3 tests and those were similar to Pro 3.1.  So it seems this change started with Pro 3.3 and has continued since.

I'm assuming there was some reason for the change.  Hopefully to improve the accuracy of the result.  But the performance hit is huge making it unusable for doing any bulk processing needing to know distances.  Another test I tried was to use the GeometryEngine.NearestPoint method.  This also provides a distance result as well along with other information.  This at least is about twice as fast as DistanceTo completing in about 3 seconds.  But that's also what I see in Pro 3.1 where NearestPoint is also faster than DistanceTo completing the test in 70ms.  I haven't yet found a way to get a fast performing test between geometries to know if they are within a tolerance or to find out which is the closest.

Is this an expected result?  If so, does anyone have any recommendations for other ways to test for distances that would be as performant as this all was before Pro 3.3?  Thanks.

10 Replies
AnnetteLocke
Esri Contributor

I see. I will let you know what I find out.

0 Kudos