<?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: Script runs fine, but results come slower and slower in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/script-runs-fine-but-results-come-slower-and/m-p/631900#M49231</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;After all, this may be due to the cache of the external disk filling up after a few (hundred) datasets. After that, real disk-writing occurs, which is slower. Restarting the script would then mean that the cache gets cleared before work restarts and fills it again.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you delete an object from a geodatabase, it is not truly deleted, just flagged for deletion. The way to make it really go away and no longer take up disk space is to &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000000n000000"&gt;Compact&lt;/A&gt;&lt;SPAN&gt; (not compress) the geodatabase.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Aug 2012 23:07:03 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2012-08-06T23:07:03Z</dc:date>
    <item>
      <title>Script runs fine, but results come slower and slower</title>
      <link>https://community.esri.com/t5/python-questions/script-runs-fine-but-results-come-slower-and/m-p/631898#M49229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear colleagues,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script below seems to work fine, but slows down considerably and gradually after a few hundred datasets have been added to the geodatabase. The speed comes back when the script is restarted. This makes me believe that the problem is unrelated to the fact that the workspace that I use is on an external drive. The dataset and geodatabase are also too large to move to my internal harddisk so that I could test this. The memory that the process related to the script uses, does not increase as more datasets have been imported (visible through task manager). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Questions: why does this happen and how to avoid it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy
from arcpy import env
import random

# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")
arcpy.CheckOutExtension("3D")


# Set environment settings
env.workspace = "G:/My_workspace"

fullset = arcpy.ListDatasets("*", "ALL")
fcCount = len(fullset)
print fcCount

# randomize list so that any proportion of the full workload 
# already delivers a random sample
random.shuffle(fullset)

for tiff in fullset:
 try: 
&amp;nbsp; arcpy.RasterToGeodatabase_conversion(tiff, "big.gdb")
&amp;nbsp; arcpy.Delete_management(tiff, "")
&amp;nbsp; fcCount -= 1
&amp;nbsp; print fcCount
 except:
&amp;nbsp; fcCount -= 1
&amp;nbsp; print "failed at" + fcCount&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Aug 2012 01:36:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-runs-fine-but-results-come-slower-and/m-p/631898#M49229</guid>
      <dc:creator>ArnaudTemme</dc:creator>
      <dc:date>2012-08-05T01:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Script runs fine, but results come slower and slower</title>
      <link>https://community.esri.com/t5/python-questions/script-runs-fine-but-results-come-slower-and/m-p/631899#M49230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After all, this may be due to the cache of the external disk filling up after a few (hundred) datasets. After that, real disk-writing occurs, which is slower. Restarting the script would then mean that the cache gets cleared before work restarts and fills it again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 13:50:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-runs-fine-but-results-come-slower-and/m-p/631899#M49230</guid>
      <dc:creator>ArnaudTemme</dc:creator>
      <dc:date>2012-08-06T13:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Script runs fine, but results come slower and slower</title>
      <link>https://community.esri.com/t5/python-questions/script-runs-fine-but-results-come-slower-and/m-p/631900#M49231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;After all, this may be due to the cache of the external disk filling up after a few (hundred) datasets. After that, real disk-writing occurs, which is slower. Restarting the script would then mean that the cache gets cleared before work restarts and fills it again.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you delete an object from a geodatabase, it is not truly deleted, just flagged for deletion. The way to make it really go away and no longer take up disk space is to &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000000n000000"&gt;Compact&lt;/A&gt;&lt;SPAN&gt; (not compress) the geodatabase.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2012 23:07:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-runs-fine-but-results-come-slower-and/m-p/631900#M49231</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-08-06T23:07:03Z</dc:date>
    </item>
  </channel>
</rss>

