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?
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?
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();
Are you searching records from a file geodatabase or an enterprise geodatabase?
file geodatabase
Thank you for being so patient, @Chapin! We have fixed the performance issue in the Pro SDK 3.1.
thanks for your efforts