Select to view content in your preferred language

about arcgis pro sdk featureclass search efficiency

1090
6
07-21-2022 03:16 AM
Chapin
by
Occasional Contributor

I hava a point featureclass , and the count of the featureclass is about 350000.

and comparing the query efficiency of arcgis engine, I found that the query efficiency of arcgis pro sdk is much slower, and I don't know why this is so.

the test data is the same featureclass and the test code is:

arcgis engine:

watch.Start();

using (var pointFeatureCursor = pointFeatureClass.Search(null, true)){

while ((var pointFeature = pointFeatureCursor.NextFeature()) != null){

  var point = (IPoint) pPointFeature.ShapeCopy;

  dictionary.Add(pointFeature .OID, point);

}

}
watch.Stop();

string time = watch.ElapsedMilliseconds.ToString();

//arcgis engine  feature class search cost 82671ms

arcgis pro sdk:

using (var pointFeatureCursor = pointFeatureClass.Search())
{
while (pointFeatureCursor.MoveNext())
using (var pointFeature = pointFeatureCursor.Current as Feature)
{

  var point = (MapPoint)pointFeature.GetShape();

  dictionary.Add(pointFeature.GetObjectID(), point);

}

}

//arcgis pro sdk  feature class search cost 732909ms

 

The efficiency of arcgis pro sdk is about 10 times slower than the efficiency of arcgis engine.why?

 

 

 

0 Kudos
6 Replies
Aashis
by Esri Contributor
Esri Contributor

Hi @Chapin, Could you please provide database information (type/version) for the investigation? Where are you calling the above snippets in a CoreHost application or an Addin?

0 Kudos
Chapin
by
Occasional Contributor

Hi sir,
the details of my problem are as follows:

- arcgis pro 2.8 and arcgis engine 10.4

gdb as  database

- the test method calling in arcgis pro addin and i use winform on click these method

 

sir,I just tested and found that this statement to get the shape is slow. If i don't add this, it will be very fast. only 4000ms

var point = (MapPoint)pointFeature.GetShape();

 

 
0 Kudos
Aashis
by Esri Contributor
Esri Contributor

Are you searching records from a file geodatabase or an enterprise geodatabase?

0 Kudos
Chapin
by
Occasional Contributor

file geodatabase

Aashis
by Esri Contributor
Esri Contributor

Thank you for being so patient, @Chapin! We have fixed the performance issue in the Pro SDK 3.1.

0 Kudos
Chapin
by
Occasional Contributor

thanks for your efforts

0 Kudos