Iterate Feature Classes - too long processing time

221
3
Jump to solution
12-14-2021 12:21 AM
Labels (2)
ANowickiAIC
New Contributor II

Processing time of my model is too long.

Right now my model is supposed to process around 260 feature classes (each of them contains single point) into one feature class. All feature classes are located inside geodatabase in one feature dataset. For that purpose I am using submodel which iterates through the dataset and with use of Collect Values tool it allows me to append all the feature classes into one class.

Unfortunatelly the processing time for that test dataset is around 4-5 hours, which is too long. Is there any option to optimize the model and make it faster? Below you can see screenshots of my submodel and main model.

Main model:

mainmodel.PNG

Submodel:

submodel.PNG

  

0 Kudos
1 Solution

Accepted Solutions
ANowickiAIC
New Contributor II

Ok, so I was able to optimize my model by reducing operations.

Main reason for increasing processing time of each feature class is probably due to use of feature classes with single points in each of them.

Previously I had about 3 models, where 1st was getting centroids from reclassified rasters by iterating through those rasters and saving each calculated centroid feature class into geodatabase, 2nd was iterating through created centroids feature classess to create a list of those with Collect Values tool and final one was appending all those feature classess into one feature class.

To make it quicker I skipped 2nd model and used Collect Values tool in 1st model. Also I used memory-based workspaces for all intermediate data.

View solution in original post

3 Replies
curtvprice
MVP Esteemed Contributor

I'm trying to figure out why it is taking so long. Are you adding these iterating point feature layers to a map ("Add to display")? That would really slow things down.

0 Kudos
ANowickiAIC
New Contributor II

Thank you for your reply. No, I'm not adding anything to the display.

 

EDIT: After few tests with memory-based workspace I noticed that first few dozen of feature classess are computed almost instantly, but after 50-60th processing slows down dramatically.

0 Kudos
ANowickiAIC
New Contributor II

Ok, so I was able to optimize my model by reducing operations.

Main reason for increasing processing time of each feature class is probably due to use of feature classes with single points in each of them.

Previously I had about 3 models, where 1st was getting centroids from reclassified rasters by iterating through those rasters and saving each calculated centroid feature class into geodatabase, 2nd was iterating through created centroids feature classess to create a list of those with Collect Values tool and final one was appending all those feature classess into one feature class.

To make it quicker I skipped 2nd model and used Collect Values tool in 1st model. Also I used memory-based workspaces for all intermediate data.