<?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: Python code in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350688#M27511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is truly taking all day, then I wouldn't blame the python code.&amp;nbsp; Try it on another machine if possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Jul 2014 22:39:13 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2014-07-11T22:39:13Z</dc:date>
    <item>
      <title>CopyFeatures from Excel data source much slower in 10.1 than 10.0</title>
      <link>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350687#M27510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have updated my ArcGIS from ArcGIS 10.0 to ArcGIS 10.1 and now my python code is SOOOO SLOW. And worked fine in ArcGIC 10.0!!&amp;nbsp; What is the difference between to two??&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Python Code&lt;/SPAN&gt;:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;### Import arcpy module 
import arcpy
# Local variables:
dir = "E:\\Dawson_Monique\\Weather_Grid\\Louis_Excel_2\\Prov_MB\\"
for nodes in range(1,152):
&amp;nbsp; name = "nodes_gp_" + str(nodes) + ".csv"
&amp;nbsp; xyfile = dir + name
&amp;nbsp; eventfile = dir + "layer\\nodes_gp_"+ str(nodes) + "_layer.shp"
&amp;nbsp; arcpy.MakeXYEventLayer_management(xyfile, "lon", "lat", xyfile, "", "")
&amp;nbsp; arcpy.CopyFeatures_management(xyfile, eventfile, "", "0", "0", "0")
&amp;nbsp; print nodes
print "done"&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Copy Feature portion is Slow. Why? Use to take 5 min now all day.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;MO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Curtis Price
(edited title, formatted code)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:29:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350687#M27510</guid>
      <dc:creator>MoniqueDawson</dc:creator>
      <dc:date>2021-12-11T16:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Python code</title>
      <link>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350688#M27511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is truly taking all day, then I wouldn't blame the python code.&amp;nbsp; Try it on another machine if possible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2014 22:39:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350688#M27511</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-07-11T22:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Python code</title>
      <link>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350689#M27512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a shot in the dark but you may want to make sure the paths to the ArcGIS python install location are correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 11:27:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350689#M27512</guid>
      <dc:creator>JohnBrodnicki</dc:creator>
      <dc:date>2014-08-28T11:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Python code</title>
      <link>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350690#M27513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe the performance issue is likely due to the heavy use of csv files in your code. There is an outstanding issue &lt;A href="http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMTAzMDU5"&gt;NIM103059&lt;/A&gt; that would seem to fit your case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 16:34:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350690#M27513</guid>
      <dc:creator>DavidWynne</dc:creator>
      <dc:date>2014-08-28T16:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Python code</title>
      <link>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350691#M27514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have the input &lt;EM&gt;csv&lt;/EM&gt; files &lt;SPAN style="line-height: 1.5;"&gt;massively &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5;"&gt;changed in size? Or as Dan suggests has something changed with your machine? Are you getting low on disk space, when did you last run a disk clean up or defrag on your system?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Sep 2014 14:21:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350691#M27514</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2014-09-10T14:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Python code</title>
      <link>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350692#M27515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A really good workaround (that, David, I think should be added to the NIM) is to use numpy. &lt;A href="https://community.esri.com/migrated-users/41477"&gt;Monique Dawson&lt;/A&gt;‌ if you are processing hundreds of files should be much faster even after the bug is fixed (and would have been faster in 10.0 too).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14119530791322556 jive_text_macro" jivemacro_uid="_14119530791322556" modifiedtitle="true"&gt;
&lt;P&gt;from numpy import genfromtxt&lt;/P&gt;
&lt;P&gt;my_data = genfromtxt('my_file.csv', delimiter=',')&lt;/P&gt;
&lt;P&gt;arcpy.da.NumPyArrayToTable(array, "in_memory/tmp_xytable")&lt;/P&gt;
&lt;P&gt;lyrTemp = arcpy.MakeXYEventLayer_management(tmp_xytable, "lon", "lat", xyfile, "", "")&lt;/P&gt;
&lt;P&gt;arcpy.CopyFeatures_management(lyrTemp, eventfile, "", "0", "0", "0")&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Sep 2014 01:12:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350692#M27515</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-09-29T01:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python code</title>
      <link>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350693#M27516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good idea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 22:40:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copyfeatures-from-excel-data-source-much-slower-in/m-p/350693#M27516</guid>
      <dc:creator>DavidWynne</dc:creator>
      <dc:date>2014-10-01T22:40:10Z</dc:date>
    </item>
  </channel>
</rss>

