Select to view content in your preferred language

ModelBuilder Iteration Slows Down

1285
3
01-02-2019 09:52 AM
XuanKuai
Occasional Contributor

I'm running this model basically goes through each feature in a origin layer and a destination layer to calculate the shortest path. There's nothing wrong with the model, the results are perfect. However, the processing time is becoming significantly longer than the beginning - 1 second per iteration at the beginning but now it takes 6 - 7 seconds. I break the task into small parts, I tried rebooting both ArcMap and the PC, I cleaned up the system junk, I even tried disk defragment and system file check. But none of the efforts seems to accelerate the processing even a little bit. Any thoughts on how to bring the fast speed back, except for what I've tried? Or am I doing irreversible damage to my hard disk/CPU with running such a heavy task (200,000 routes)?

0 Kudos
3 Replies
curtvprice
MVP Esteemed Contributor

Perhaps you can monitor system resources as it runs. If you are using more and more memory you may want to look at layers and table views -- if your model could delete temporary layers or datasets as part of the loop that may help.

0 Kudos
XuanKuai
Occasional Contributor

Thank you. My model deletes every possible temp layers possible.

I found this really good article about speeding up ArcMap: How to Make ESRI Desktop ArcMap Faster · ncss-tech/geo-pit Wiki · GitHub 

Basically I think the problem with my issue is that junk files pile up in the geodatabase and slow down the model, but the Delete tool does nothing to this. I noticed this because every reading and calculating step is as fast as the beginning, but the writing step is very slow. I tried everything in the article above applicable and I copied my data to a new file geodatabase and work in there. The model now runs fast as it used to be.

0 Kudos
curtvprice
MVP Esteemed Contributor

Unless you are filling a database with many files (ie the temp files are the ones that are causing you to have many files) you may want to try running the compact geodatabase tool at the end of every iteration to "burn in" those deletes. Just a thought. Thanks for that link on optimizing ArcMap, looks helpful!

0 Kudos