<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CopyFeatures tool runs 10 times slower in a Python script than from ArcToolbox in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141232#M4818</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This appears to be fixed for me at ArcGIS 10 SP2. Are you using SP2 as well?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Two workarounds were mentioned:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Use Feature Class to Feature Class instead of Copy Features (no improvement, at the time)&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Call a model that uses CopyFeatures from the Python script (IIRC this was fast but not very practical).&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;SPAN&gt;You might check on the status of the following Nimbus IDs that were mentioned:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#NIM041113&amp;nbsp; The Python script to export shapefile from ArcSDE is extremely slow&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#NIM043129&amp;nbsp; Performance of Feature Class to Shapefile when used in Python is slow&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Aug 2011 20:56:52 GMT</pubDate>
    <dc:creator>LoganPugh</dc:creator>
    <dc:date>2011-08-11T20:56:52Z</dc:date>
    <item>
      <title>CopyFeatures tool runs 10 times slower in a Python script than from ArcToolbox</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141226#M4812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dismayed by how long a Python script I've developed was taking to copy features to a shapefile, I decided to do some testing. When run from ArcToolbox, the Copy Features (management) tool takes about 12 minutes to copy a large point feature class from SDE to a local shapefile. I wrote a small test script that does the exact same thing, using CopyFeatures_management to copy the same SDE feature class to a local shapefile, and it took over 2 hours!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What could possibly explain this discrepancy? I've seen a few mentions of similar problems with the CopyFeatures tool on the old forums but no real explanation or solution.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jul 2010 19:18:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141226#M4812</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2010-07-29T19:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures tool runs 10 times slower in a Python script than from ArcToolbox</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141227#M4813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Dismayed by how long a Python script I've developed was taking to copy features to a shapefile, I decided to do some testing. When run from ArcToolbox, the Copy Features (management) tool takes about 12 minutes to copy a large point feature class from SDE to a local shapefile. I wrote a small test script that does the exact same thing, using CopyFeatures_management to copy the same SDE feature class to a local shapefile, and it took over 2 hours!&lt;BR /&gt;&lt;BR /&gt;What could possibly explain this discrepancy? I've seen a few mentions of similar problems with the CopyFeatures tool on the old forums but no real explanation or solution.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Logan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;can you include your script here, for us to look at?&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Barbara Bicking&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI Geoprocessing Team&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jul 2010 20:49:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141227#M4813</guid>
      <dc:creator>BBicking1</dc:creator>
      <dc:date>2010-07-29T20:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures tool runs 10 times slower in a Python script than from ArcToolbox</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141228#M4814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sure, here it is (very simple -- just a test script):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcgisscripting, os

in_feat = r"Database Connections\LPUGH@GISPROD.sde\SDE.ABBE\SDE.ADDRESSES"
out_shp = r"C:\temp\addr_test.shp"

gp = arcgisscripting.create(9.3)
try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.copyfeatures_management(in_feat, out_shp)
finally:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print gp.GetMessages()
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:46:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141228#M4814</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2021-12-11T07:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures tool runs 10 times slower in a Python script than from ArcToolbox</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141229#M4815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Sure, here it is (very simple -- just a test script):&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcgisscripting, os

in_feat = r"Database Connections\LPUGH@GISPROD.sde\SDE.ABBE\SDE.ADDRESSES"
out_shp = r"C:\temp\addr_test.shp"

gp = arcgisscripting.create(9.3)
try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.copyfeatures_management(in_feat, out_shp)
finally:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print gp.GetMessages()
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Logan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I spoke with a bunch of people here and the consensus is that it's very difficult to say why your Python script takes so long. It can be the SDE database you're using; how many people are accessing it at the same time; the data itself; other settings you have. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Test with a smaller set of your data and see what time you get then.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For us to help, we'll need your data and details of your work environment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Barbara Bicking&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:47:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141229#M4815</guid>
      <dc:creator>BBicking1</dc:creator>
      <dc:date>2021-12-11T07:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures tool runs 10 times slower in a Python script than from ArcToolbox</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141230#M4816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for looking into it. I do not think it's an SDE problem because the same issue occurs on large file geodatabase feature classes as well. I will do some more testing on different sizes/types of feature classes and in the meantime will submit a bug report through our usual channel.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 20:57:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141230#M4816</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2010-07-30T20:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures tool runs 10 times slower in a Python script than from ArcToolbox</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141231#M4817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Were you able to resolve what was causing the problem?&amp;nbsp; I am having a similar issue in v10, trying to use CopyFeatures from a layer file to an SDE feature class.&amp;nbsp; Running it in model builder it takes 14 minutes, but when I export that to a python script it takes 4.5 hours.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 19:01:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141231#M4817</guid>
      <dc:creator>LouJacoby</dc:creator>
      <dc:date>2011-08-11T19:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: CopyFeatures tool runs 10 times slower in a Python script than from ArcToolbox</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141232#M4818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This appears to be fixed for me at ArcGIS 10 SP2. Are you using SP2 as well?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Two workarounds were mentioned:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Use Feature Class to Feature Class instead of Copy Features (no improvement, at the time)&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Call a model that uses CopyFeatures from the Python script (IIRC this was fast but not very practical).&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;SPAN&gt;You might check on the status of the following Nimbus IDs that were mentioned:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#NIM041113&amp;nbsp; The Python script to export shapefile from ArcSDE is extremely slow&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#NIM043129&amp;nbsp; Performance of Feature Class to Shapefile when used in Python is slow&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 20:56:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/copyfeatures-tool-runs-10-times-slower-in-a-python/m-p/141232#M4818</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-08-11T20:56:52Z</dc:date>
    </item>
  </channel>
</rss>

