laptop and a wrench

漏洞

Noticeable slowdown while retrieving a feature using IFeatureClass.GetFeature() from a versioned data rather than from a non-versioned data.

上次发布: August 25, 2014 ArcSDE/Enterprise Geodatabase
漏洞 ID 编号 NIM050922
已提交November 10, 2009
上次修改时间June 5, 2024
适用范围ArcSDE/Enterprise Geodatabase
找到的版本9.3.1
编程语言All
状态Will Not Be Addressed

附加信息

No Public Explanation

解决办法

Suggested to use IGeodatabsebridge::Getfeatures to get a featurecursor instead of IfeatureClass.getfeature(), which run much faster In both versioned and in non-versioned data. But User was not able to implement this suggestion in his code because it will be affecting his production code.Code suggested:private static void TestGetFeature4() { int[] ids = new int[NUM_TRIALS]; int id = 1; for (int i = 0; i < NUM_TRIALS; i++) { ids[i] = id + i; } IWorkspaceFactory workspaceFactory = new SdeWorkspaceFactory(); IFeatureWorkspace ws = (IFeatureWorkspace)workspaceFactory.OpenFromFile(GEODATABASE_PATH, Win32.GetDesktopWindow()); Console.WriteLine("Opened SDE Geodatbase"); IFeatureClass featureClass = ws.OpenFeatureClass("sde.SDE.USPlaces_Ver"); Int16 featurecount = (short)featureClass.FeatureCount(null); Console.WriteLine("Got " + featureClass.AliasName + " With " + featurecount.ToString() + " features"); IGeoDatabaseBridge2 gdbHelp = new GeoDatabaseHelperClass(); IFeatureCursor fcur = gdbHelp.GetFeatures(featureClass, ref ids, true); long totalTime = 0; Int64 start = Environment.TickCount; IFeature feat = fcur.NextFeature(); totalTime += (Environment.TickCount - start); while (feat != null) { System.Diagnostics.Debug.WriteLine(feat.OID); start = Environment.TickCount; feat = fcur.NextFeature(); totalTime += (Environment.TickCount - start); } Console.WriteLine("total time in Miliseconds: " + totalTime); double avgTime = (double)totalTime / (double)NUM_TRIALS; Console.WriteLine("average time in Miliseconds: " + avgTime); Int32 count = Console.Read(); }

重现步骤

漏洞 ID: NIM050922

软件:

  • ArcSDE/Enterprise Geodatabase

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项