Select to view content in your preferred language

Improve performance of CreateFeatureDataset and CreateFeatureClass

506
0
05-29-2019 11:04 AM
SusanFarley
Occasional Contributor

I am still working on performance and am now trying to improve it on this area of code:

  

      List<object> args = new Lis<object>();

      args.Add(gdbpath); /*path is on local drive*/

      args.Add(datasetname);

      await QueuedTask.Run(() =>

      {

         args.Add(SpatialReferenceBuilder.CreateSpacialReference(Map.SpacialReference.Wkid));

      }

   //This one line takes 10 seconds on a very small network

   await Geoprocessing.ExecuteToolAsync("management.CreateFeatureDataset", Geoprocessing.MakeValueArray(args.ToArray()));

With the CreateFeatureDataset taking 10 seconds with an extremely small network (158 nodes and 182 links), I am worried how long it will take when the users start running it on several thousand nodes. Is there a way to either speed this up or another way to accomplish the same thing that would be faster? I have this call in a few places so the time adds up very quickly.

I am also having the same problem with

       await Geoprocessing.ExecuteToolAsync("management.CreateFeatureclass", Geoprocessing.MakeValueArray(args.ToArray())); //takes 9 seconds or more per call so one for nodes and one for links

Thank you,

Susan

Tags (2)
0 Replies