Mass edit/create features before committing them to the server

180
1
a month ago
FanisDeligiannis
New Contributor II

Hello. I have an made an add-in that deals with lots of data, which are found in a remote server.

One query to the server is ~0.5 seconds. I quickly learnt that it's much faster to make one query to the server at the start, and get all the needed data locally (in a memory geodatabase), and then do all my calculations and queries there, where the queries are as good as instant.

But then, I need to update or create a bunch of features on the server. That takes about ~0.5 seconds per feature (as in, each feature.Store() and each featureclass.CreateRow(...) takes ~0.5 seconds), which really add up when I am dealing with thousands of features. 

It's also really important that all edited features retain historic/versioning data. 

 

More details about the performance, before I saved all data locally, my tool took more than 5 hours to run on about 2000 polyline features.

Now, on an area with 86000 polyline features, it takes around 10 minutes to get all the data locally, 10 minutes to do all the calculations, and over 2 hours just to create/edit features according to the calculations that are already done. Which, to me, is crazy.

 

Is there a way to do all the edits/creations, and then s end them to the server all at once, instead of doing it one-by-one?

 

0 Kudos
1 Reply
Aashis
by Esri Contributor
Esri Contributor

For data insert, have you looked into the insert cursor?

For further details, please refer to the conceptual doc.

0 Kudos