add feature by rest is so slow

874
3
10-17-2016 04:37 PM
Pierre-JeanMuller
New Contributor III

Hello,


I am adding features using this page as a reference
Edit features—ArcGIS Runtime SDK for .NET | ArcGIS for Developers 

so I create an instance of ServiceFeatureTable, initialize it then I use addAsync, then ApplyEditsAsync.

but it is so slow (just three add by second). When I tried to add the features directly from SQL server, it is much faster (40 by second). 

I tried to keep the connection all the time, but it doesnt change anything

Is there a better way to edit features?
is it normal that I edit features by normal database connection?


0 Kudos
3 Replies
JonathanQuinn
Esri Notable Contributor

If you edit the feature service through the REST endpoint, do you still see the slowness?  Where is the database in relation to the ArcGIS Server?  Does the map service perform slowly when just panning and zooming?

0 Kudos
Pierre-JeanMuller
New Contributor III

When I try to modify using arcgis online, it is fast.
my database is sql server database and it is on the same computer.

the map service is fairly good

here is my code if it is needed:


ServiceFeatureTable featureTable = new ServiceFeatureTable(url);

featureTable.InitializeAsync(spatialReference).Wait();
featureTable.OutFields = OutFields.All;
featureTable.AddAsync(feature).Wait();
FeatureEditResult result = featureTable.ApplyEditsAsync().Result;

0 Kudos
JonathanQuinn
Esri Notable Contributor

Thanks for the testing.  I'm not familiar with .NET so I just wanted to see if it was possibly a performance issue between the ArcGIS Server and the database and not something within your code itself.  However, given that the map performs well and editing the feature service through REST is fine as well, it does seem something specific to .NET.  Another thing you can look at outside of your code is to set the logs to DEBUG and see if anything stands out within the logs when you  make an edit through .NET.  Sorry I couldn't be of more help, but perhaps someone more familiar with what you're doing can chime in.

0 Kudos