<?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: Converting ArcGIS Pro table to in-memory takes extremely long time in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/converting-arcgis-pro-table-to-in-memory-takes/m-p/1477465#M70646</link>
    <description>&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/the-in-memory-workspace.htm" target="_blank"&gt;Write geoprocessing output to memory—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;which workspace type "memory" or "in_memory" ?&lt;/P&gt;&lt;P&gt;Your code doesn't specify.&amp;nbsp; Did you compare the two?&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2024 05:33:31 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2024-05-23T05:33:31Z</dc:date>
    <item>
      <title>Converting ArcGIS Pro table to in-memory takes extremely long time</title>
      <link>https://community.esri.com/t5/python-questions/converting-arcgis-pro-table-to-in-memory-takes/m-p/1477429#M70645</link>
      <description>&lt;P&gt;As part of a workflow in an python toolbox, I need to grab a table created from a layer in ArcGIS Pro. I've tried several methods, but they all take an absurdly long time. For a table with 50,000 records and &amp;lt;10 columns (weighing in at ~10 MB on disk), it takes well over 3 minutes. I can't expect a user to wait &amp;gt;3 minutes for a tool to run, so I'm trying to see if there's a more efficient method. Here's what I've tried:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;tmp=arcpy.da.TableToNumPyArray("temp") # 3 mins 22 seconds

arcpy.conversion.ExportTable("temp", my_dir) # 3 mins 31 seconds

l=[]
with arcpy.da.SearchCursor('temp', field_names) as cursor:
    for row in cursor:
        l.append(row) # 3 mins 25 seconds&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there really no way to get a small file in less than 3 minutes?&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 01:01:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-arcgis-pro-table-to-in-memory-takes/m-p/1477429#M70645</guid>
      <dc:creator>sbrowneotogo</dc:creator>
      <dc:date>2024-05-23T01:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Converting ArcGIS Pro table to in-memory takes extremely long time</title>
      <link>https://community.esri.com/t5/python-questions/converting-arcgis-pro-table-to-in-memory-takes/m-p/1477465#M70646</link>
      <description>&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/the-in-memory-workspace.htm" target="_blank"&gt;Write geoprocessing output to memory—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;which workspace type "memory" or "in_memory" ?&lt;/P&gt;&lt;P&gt;Your code doesn't specify.&amp;nbsp; Did you compare the two?&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 05:33:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-arcgis-pro-table-to-in-memory-takes/m-p/1477465#M70646</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-05-23T05:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Converting ArcGIS Pro table to in-memory takes extremely long time</title>
      <link>https://community.esri.com/t5/python-questions/converting-arcgis-pro-table-to-in-memory-takes/m-p/1477674#M70648</link>
      <description>&lt;P&gt;You also didn't say your input data source.&amp;nbsp; If the source is a web-GIS layer, then it may have nothing to do with writing the data out but everything to do with reading the data set over the web.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 14:33:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-arcgis-pro-table-to-in-memory-takes/m-p/1477674#M70648</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2024-05-23T14:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Converting ArcGIS Pro table to in-memory takes extremely long time</title>
      <link>https://community.esri.com/t5/python-questions/converting-arcgis-pro-table-to-in-memory-takes/m-p/1477736#M70649</link>
      <description>&lt;P&gt;I think this was the issue - I still don't entirely understand where certain things in ArcGIS Pro are actually stored, but when I reference the layer that exists on the map, it takes ~3 minutes, and I'm guessing it's for the reason you've stated, that it is sending it from a server somewhere across the web to my computer (for the record 3 minutes still seems excessive for a 10MB file). When I look at the properties for the layer, it points to a GDB on my computer. Loading that file using the TableToNumPyArray takes less than a second. Looking at the code for the tool that generates the layer, it looks like it's first writing results to the local GDB and then setting the feature layer to reflect the GDB, so I should be fine just grabbing the GDB instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate the insight that put me in the right direction!&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 15:49:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/converting-arcgis-pro-table-to-in-memory-takes/m-p/1477736#M70649</guid>
      <dc:creator>sbrowneotogo</dc:creator>
      <dc:date>2024-05-23T15:49:17Z</dc:date>
    </item>
  </channel>
</rss>

