When I run the synchronize changes geoprocessing tool in ArcMap, it only takes under 10 seconds when there are no changes. However if I run this in arcpy it takes up to a minute to run. Any thoughts why its so much slower when running in a script?
try this script and see how long it takes to run:
Depending on your infrastructure, it can take 30 seconds++ to load a license of ArcMAP (the equivilant of opening arcmap desktop) which a external script is required to do each time its run.
I have it printing a message before it executes that's GP tool and it that prints within 5 to 10 seconds. Then the command finishes at close to 2 minutes. My work around to get it to execute faster was to publish the GP results to ArcGIS Server and the just make Rest calls in Python. This is actually faster than ArcMap, since server is 64bit. Get around the loading time since instances are already available.
Retrieving data ...