AnsweredAssumed Answered

Viewshed slows down after many uses

Question asked by martywilliams on Aug 20, 2012
Latest reply on Aug 22, 2012 by csny490
I wrote a python script that runs several thousand viewsheds as part of an analysis we do. I???ve been using it for a while and everything was fine, with each viewshed taking the same, reasonable amount of time to run.

I recently experimented by changing the scratch workspace from the default value of the default geodatabase to a normal file directory where I was saving the output files. From small tests I found this sped things up a bit so I changed the script accordingly.

However, the viewsheds started taking longer and longer. The script records how long it takes to perform and process each viewshed, and from the results I could see it taking more time for each successive viewshed. What should have been a 6-8 hour run turned into 34 hours. Tested individually the other steps are still speedy ??? it???s just the viewshed that???s slow.

I changed it back to the default geodatabase and it???s still slow. Even running a single viewshed directly in ArcMap or ArcCatalog is now severely slow. On another computer, a test viewshed running in ArcMap took 4 seconds. On the now-slow machine using the same data, it took 45 seconds.

Also, it???s slow in an unusual way; when I click ???OK??? in the tool window to run the tool, the application hangs and it takes about 15 seconds before the progress window comes up. Then it spends another 25-30 seconds there before completing. The Observer Points tool which seems very similar to viewshed also exhibits the same behavior. Other tools, however, like Slope, Hillshade, or even normal ones like Clip or Buffer, all act normal and very speedy. When I click OK the progress window comes up immediately without hanging and they finish quickly.

Another odd observation ??? when I set the last parameter in the tool before there are no more green dots, the application hangs for about 10 seconds before becoming responsive again. It can be either the raster or the observer features, but after the last one it hangs, like it???s doing some very time-consuming validation once all the parameters have been set.

I???m using ArcGIS 10.0 with no service pack (which is what our customer uses, and I???m afraid to upgrade out of fear of losing compatibility of some kind) on Windows 7 32-bit. Background processing is off, and logging geoprocessing operations to a log file is now off.

From running thousands of Viewsheds I thought maybe it was saving temporary files or some log and now it has to check every entry when performing validation or something, which is why it seems to take longer and longer now. I tried clearing the ArcToolbox log under /Users/myname/AppData/Roaming/ESRI/Desktop10.0/ArcToolbox/log to no effect. Nothing seemed out of place with the default geodatabase but I deleted it anyway and ArcGIS created a new one. No effect from that either.

Does anyone have any idea why Viewshed (and Observer Points) would now take such a long time to run, considering that I???ve run them just fine tens of thousands of times before using the default geodatabase as the scratch workspace, but once I switch to a file directory it becomes slow as molasses over time, staying slow when I change it back? Help!