Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm using ArcGIS Server 10.0. I have a python geoprocessing that takes a lot of time. The geoprocessing calculates geometries using points, polygons, buffers, and cursors.

I'm also using sql queries with the SdeExecuteSQL function. This function seems to take time too. Is it possible to optimize this?

Do you have any hint of how to optimize the geoprocessing?

Would it be shorter in time if I used the Java API?

share|improve this question
    
What software? What does your code look like? –  Nathan W Sep 10 '13 at 8:25
    
My code contains more than 3000 lines. To resume, it reads data from database, creates and modifies geometries and non spatial objects, using some business rules. Then inserts the changes into database. I'd like to know if in general the arcpy is slower than Java ArcObjects. –  yo_haha Sep 10 '13 at 8:30
1  
Well without seeing your code it's going to be hard to tell what issues you might be having. I would suggest you put some timers in the code and see if you can find the bottleneaks. –  Nathan W Sep 10 '13 at 8:34
add comment

closed as unclear what you're asking by PolyGeo, iant Sep 10 '13 at 12:30

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

I am assuming that you are using ArcPy 10.0 cursors in your code and this will be appreciably slower than ArcObjects.

If you use the ArcPy 10.1/10.2 Data Access cursors you will find them much (perhaps 10x) faster than ArcPy 10.0 cursors.

share|improve this answer
    
OK thanks! I'm also using sql queries with the SdeExecuteSQL function. This function takes time too. Is it possible to optimize this? –  yo_haha Sep 10 '13 at 10:21
    
Could you edit your Question to include this additional information, please? However, it would appear that this may represent an additional question so perhaps consider posting a new one for it. –  PolyGeo Sep 10 '13 at 10:25
    
@PolyGeo, yo_haha is using v10.0 so data access cursors are not an option. –  artwork21 Sep 10 '13 at 12:18
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.