<?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: Poor performance with FileGDB and AddField_management in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147780#M5017</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This was run out of the arcmap environment&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That might be the issue... What if you run it via PythonWin (or some other IDE)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I remeber a while back someone had determined that the ArcMap Python window interface (for whatever reason), perfomed quite a bit slower than other IDE's when running a searchcursor (I think that was what it was). I can't seem to find that post... Anyway.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I run my stuff almost exclusivly in Pythonwin, and AddField for a FGDB has pretty good perfomance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Nov 2011 18:25:39 GMT</pubDate>
    <dc:creator>ChrisSnyder</dc:creator>
    <dc:date>2011-11-30T18:25:39Z</dc:date>
    <item>
      <title>Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147774#M5011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am getting poor performance adding fields to a feature class in a FileGDB.&amp;nbsp; This is a ArcGIS Server geoprocessing service and for each call, AddField is taking between 1.3 and 1.8 seconds per call.&amp;nbsp; With 25 fields to add (I don't know what they are ahead of time) it takes way too long to run for a service.&amp;nbsp; If I use in memory or shapefiles, it takes about 1/10 the time.&amp;nbsp; Is there a way to add multiple fields at once to avoid the overhead (I assume) of opening and closing the FileGDB?&amp;nbsp; Shape files and in memory features don't support all the functionality I need.&amp;nbsp; Below is a quick example straight from my arcpy console (the exec calls are for more accurate times):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;gt;&amp;gt;&amp;gt; fc = 'C:\\Users\\kshannon\\Documents\\ArcGIS\\Default.gdb\\output'
&amp;gt;&amp;gt;&amp;gt; shp = C:\\Users\\kshannon\\Documents\\ArcGIS\\output.shp'
&amp;gt;&amp;gt;&amp;gt; gdb_code = 'start = time.clock()\narcpy.AddField_management(fc,new_field,"DOUBLE")\nprint("AddField:{0}".format(time.clock()-start))'
&amp;gt;&amp;gt;&amp;gt; shp_code = 'start = time.clock()\narcpy.AddField_management(fc,new_field,"DOUBLE")\nprint("AddField:{0}".format(time.clock()-start))'
&amp;gt;&amp;gt;&amp;gt; new_field = "NEW_FIELD"
&amp;gt;&amp;gt;&amp;gt; exec(shp_code)
AddField:0.683299860168

&amp;gt;&amp;gt;&amp;gt; exec(gdb_code)
AddField:1.4100630674
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Neither feature is loaded in ArcMap.&amp;nbsp; The time gap grows quite a bit with 25-30 new Fields.&amp;nbsp; Any suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Nov 2011 16:27:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147774#M5011</guid>
      <dc:creator>KyleShannon</dc:creator>
      <dc:date>2011-11-28T16:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147775#M5012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Kyle, what functionality do you need to keep?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 17:55:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147775#M5012</guid>
      <dc:creator>AndrewBrown</dc:creator>
      <dc:date>2011-11-29T17:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147776#M5013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could it be that there is something different/special about Default.gdb?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you copy your table or feature class to a brand new FGDB, does it still take a long time?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What if you run a Compact on Default.gdb?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is probably a bad practice (performace-wise) to use Default.gdb, as there is a lot of opportunity for it to get quite fragmented.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 01:32:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147776#M5013</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-11-30T01:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147777#M5014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using a 'scratch' geo database, as described in this example: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Guide_to_the_geoprocessing_service_examples/002v00000013000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Guide_to_the_geoprocessing_service_examples/002v00000013000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, I am using a brand new geodatabase each time.&amp;nbsp; The basic process is this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Client submits a feature set of points that may or may not contain attributes, likely to have an id.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) I create a new feature class and copy the attributes from the input feature set into the new feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) I call a secondary service and get more attributes for the point features.&amp;nbsp; I add fields to the new feature class based on the result of the call to the other service.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) I use an update cursor to fill in the new attributes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5) I return the feature class to the client.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I imagine that every time I call add field on the gdb, it aquires a lock or mutex or whatever they call it for a file gdb, and then add the field and release the lock.&amp;nbsp; If this is the case, exposing an AddFields(list()) would probably improve performance quite a bit.&amp;nbsp; But I really have know idea.&amp;nbsp; Thanks for the replies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;k&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 14:25:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147777#M5014</guid>
      <dc:creator>KyleShannon</dc:creator>
      <dc:date>2011-11-30T14:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147778#M5015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So my point is that the particular FGDB that you are using (C:\Users\\kshannon\Documents\ArcGIS\Default.gdb) is a new and evil ESRI invention in v10.0. By "default" all the geoprocessing tools write their results to this specific FGDB. My point is that there is a large potential for &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;this specific&lt;/SPAN&gt;&lt;SPAN&gt; FGDB and the data within it to become quite fragmented over time - the more fragmented it gets, the slower the perfomance becomes (like adding fields to a table stored there). If performance is important, I would recomend not using the Deafult.gdb.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you say "I am using a brand new geodatabase each time", is it that you are deleting and recreating the Default.gdb everytime (which would certaily take a while)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What functionality offered in a FGDB precludes using an in_memory featureclass?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An interesting feature of an in_memory table is that field add and deletes are virtually instantanious, which contrasts with a FGDB. Depending on the number of records, field deletes in a FGDB can take a very long time. Field adds however, in a "fresh" FGDB should take less than a second even when the table has a lot of records.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 15:27:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147778#M5015</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-11-30T15:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147779#M5016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;So my point is that the particular FGDB that you are using (C:\Users\\kshannon\Documents\ArcGIS\Default.gdb) is a new and evil ESRI invention in v10.0. By "default" all the geoprocessing tools write their results to this specific FGDB. My point is that there is a large potential for this specific FGDB and the data within it to become quite fragmented over time - the more fragmented it gets, the slower the perfomance becomes (like adding fields to a table stored there). If performance is important, I would recomend not using the Deafult.gdb.&lt;BR /&gt;&lt;BR /&gt;When you say "I am using a brand new geodatabase each time", is it that you are deleting and recreating the Default.gdb everytime (which would certaily take a while)?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't use Default.gdb, that was only for the example.&amp;nbsp; I have a scratch.gdb that the service generates.&amp;nbsp; I timed the creation/copy of the feature set into Scratch.gdb, and the time was small compared to a single call to AddField().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What functionality offered in a FGDB precludes using an in_memory featureclass?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nothing yet.&amp;nbsp; I have found work arounds for most cases.&amp;nbsp; In one service, we have to have support for field aliases, bot File gdb and in_memory support this, but shapefiles do not.&amp;nbsp; Another service has to reproject the points to EPSG:4326(in some cases) and File gdb and shapefiles can be the output of Reproject_management(), but in_memory can't, according to the docs.&amp;nbsp; So if a case comes up where I have to reproject the input feature set and use aliases, File GDB is the only answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;An interesting feature of an in_memory table is that field add and deletes are virtually instantanious, which contrasts with a FGDB. Depending on the number of records, field deletes in a FGDB can take a very long time. Field adds however, in a "fresh" FGDB should take less than a second even when the table has a lot of records.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It doesn't.&amp;nbsp; I created an empty FGDB and added a single point feature class with no fields.&amp;nbsp; I also created a shape file the same way.&amp;nbsp; I tested it with this script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import time

import arcview
import arcpy

gdb = "c:/data/temp.gdb/test_gdb"
shp = "c:/data/test_shp.shp"
mem = "in_memory/test"

arcpy.CreateFeatureclass_management("in_memory","test","POINT")

start = time.clock()
for i in range(25):
&amp;nbsp;&amp;nbsp;&amp;nbsp; field = "FIELD_{0}".format(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddField_management(gdb,field,"DOUBLE")
print("GDB time: {0}".format(time.clock() - start))

start = time.clock()
for i in range(25):
&amp;nbsp;&amp;nbsp;&amp;nbsp; field = "FIELD_{0}".format(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddField_management(shp,field,"DOUBLE")
print("SHP time: {0}".format(time.clock() - start))

start = time.clock()
for i in range(25):
&amp;nbsp;&amp;nbsp;&amp;nbsp; field = "FIELD_{0}".format(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddField_management(mem,field,"DOUBLE")
print("MEM time: {0}".format(time.clock() - start))
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
C:\Users\k\Desktop&amp;gt;c:\Python26\ArcGIS10.0\python.exe add_field_test.py
GDB time: 14.9272383107
SHP time: 0.505886972475
MEM time: 0.53527747266
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That is a pretty big time difference.&amp;nbsp; This was run out of the arcmap environment, so no drawing or any other overhead I can think of.&amp;nbsp; The only thing I can think of is the lock issue.&amp;nbsp; Is there a way to open a gdb and keep it open and act on it?&amp;nbsp; Like I said, for now I don't need gdbs, but it seems that performance could be improved.&amp;nbsp; I may need it in the future.&amp;nbsp; Am I doing anythin glaringly wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:01:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147779#M5016</guid>
      <dc:creator>KyleShannon</dc:creator>
      <dc:date>2021-12-11T08:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147780#M5017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This was run out of the arcmap environment&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That might be the issue... What if you run it via PythonWin (or some other IDE)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I remeber a while back someone had determined that the ArcMap Python window interface (for whatever reason), perfomed quite a bit slower than other IDE's when running a searchcursor (I think that was what it was). I can't seem to find that post... Anyway.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I run my stuff almost exclusivly in Pythonwin, and AddField for a FGDB has pretty good perfomance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 18:25:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147780#M5017</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-11-30T18:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147781#M5018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This was run out of the arcmap environment&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Worded that wrong.&amp;nbsp; out meaning not in arcmap.&amp;nbsp; I just ran it from the command line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;C:\Users\k\Desktop&amp;gt;c:\Python26\ArcGIS10.0\python.exe add_field_test.py
GDB time: 14.9272383107
SHP time: 0.505886972475
MEM time: 0.53527747266&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I ran another test creating the feature classes for each type and still performance is terrible:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;from osgeo import ogr
import time

import arcview
import arcpy

gdb = "c:/data/temp.gdb/test_gdb"
shp = "c:/data/test_shp.shp"
mem = "in_memory/test"
ogr_shp = "c:/data/test_ogr.shp"

print("Creating feature classes...")
arcpy.CreateFeatureclass_management("c:/data/temp.gdb","test_gdb","POINT")
arcpy.CreateFeatureclass_management("c:/data","test_shp.shp","POINT")
arcpy.CreateFeatureclass_management("in_memory","test","POINT")
arcpy.CreateFeatureclass_management("c:/data","test_ogr.shp","POINT")
print("Feature classes created.")

n = 25

start = time.clock()
for i in range(n):
&amp;nbsp;&amp;nbsp;&amp;nbsp; field = "FIELD_{0}".format(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddField_management(gdb,field,"DOUBLE")
t = time.clock() - start
gt = t
print("GDB time: {0}({1} sec per call)".format(t,t / n))

start = time.clock()
for i in range(n):
&amp;nbsp;&amp;nbsp;&amp;nbsp; field = "FIELD_{0}".format(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddField_management(shp,field,"DOUBLE")
t = time.clock() - start
st = t
print("SHP time: {0}({1} sec per call)".format(t,t / n))

start = time.clock()
for i in range(n):
&amp;nbsp;&amp;nbsp;&amp;nbsp; field = "FIELD_{0}".format(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddField_management(mem,field,"DOUBLE")
t = time.clock() - start
print("MEM time: {0}({1} sec per call)".format(t,t / n))

start = time.clock()
ds = ogr.Open(ogr_shp, 1)
lyr = ds.GetLayer()
for i in range(n):
&amp;nbsp;&amp;nbsp;&amp;nbsp; field = "FIELD_{0}".format(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp; field_defn = ogr.FieldDefn(field,ogr.OFTReal)
&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.CreateField(ogr.FieldDefn(field,ogr.OFTReal))
ds.Destroy()
t = time.clock() - start
print("OGR time: {0}({1} sec per call)".format(t,t / n))

print("Deleting feature classes...")
arcpy.Delete_management(gdb)
arcpy.Delete_management(shp)
arcpy.Delete_management(mem)
arcpy.Delete_management(ogr_shp)
print("Feature classes deleted.")

print("AddField is on shp is {0} times faster than on gdb".format(gt/st))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ogr is a spatial features access library with python bindings.&amp;nbsp; Results are the same:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;C:\Users\k\Desktop&amp;gt;c:\Python26\ArcGIS10.0\python.exe add_field_test.py
Creating feature classes...
Feature classes created.
GDB time: 15.0151810344(0.600607241376 sec per call)
SHP time: 0.521969915836(0.0208787966335 sec per call)
MEM time: 0.550496636539(0.0220198654616 sec per call)
OGR time: 0.657494203585(0.0262997681434 sec per call)
Deleting feature classes...
Feature classes deleted.
AddField on shp is 28.7663725032 times faster than on gdb&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you getting better performance?&amp;nbsp; Can anyone post times for a call to AddField on a simple gdb?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:01:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147781#M5018</guid>
      <dc:creator>KyleShannon</dc:creator>
      <dc:date>2021-12-11T08:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147782#M5019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay - your're right, FGDB are slow...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't have ogr installed... So no OGR times...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Creating feature classes...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature classes created.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GDB time: 23.3795888001(0.935183552003 sec per call)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SHP time: 0.984445672708(0.0393778269083 sec per call)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MEM time: 0.992119302926(0.039684772117 sec per call)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Deleting feature classes...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature classes deleted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AddField is on shp is 23.7489883375 times faster than on gdb&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Go shapefiles!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How about doing all the field adding and calcing using in_memory, and then copy top FGDB? I use this method quite a bit for the added speed in calcing and dropping fields. I never paid that much atention to how long it took to add the field in a FGBD, but yep, it is pretty slow relative to the competition.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 21:03:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147782#M5019</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-11-30T21:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147783#M5020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe you could pre-build a FGDB FC (maybe several differnt schemas depending on the data needs), and the script could then just copy and populate the template(s)?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 21:15:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147783#M5020</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-11-30T21:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147784#M5021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think copying the in memory maybe the best way to go.&amp;nbsp; I am running an extreme test overnight that adds a crazy amount of fields (5000) to each to see how performance is affected by how many fields are already present(mostly just curious).&amp;nbsp; It appears shapefiles have to traverse a list of fields before inserting, like a linked list.&amp;nbsp; I saw it with 100 fields.&amp;nbsp; FGDB, I am not sure about.&amp;nbsp; in memory I think is constant insertion, same with the ogr access.&amp;nbsp; I will see in the morning.&amp;nbsp; I know 5000 fields will probably never be inserted, but it's a good way to see trends in data.&amp;nbsp; I will post a graph tomorrow.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 22:14:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147784#M5021</guid>
      <dc:creator>KyleShannon</dc:creator>
      <dc:date>2011-11-30T22:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147785#M5022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Both fgdb and esri's shape access suffer from size/performance correlation.&amp;nbsp; It is strange, because when I use ogr to add fields, insertion is constant.&amp;nbsp; Good example of 'Schlemiel the Painter's algorithm'[0].&amp;nbsp; Never thought I would see an example of that now a days.&amp;nbsp; Attached is a graph of insertion times over the course of 1000 AddField calls.&amp;nbsp; I also tested the copy of the mem to gdb, and that seems to be the best way to go in arc:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Output of test over 1000 Add Field calls:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;C:\Users\kshannon\Desktop&amp;gt;c:\Python26\ArcGIS10.0\python.exe add_field_test.py
Creating feature classes...
Feature classes created.
GDB(Total:940.140323837,Max(924):1.72044671624,Min(60):0.582889467023,Average:0.940140323837
SHP(Total:352.133845124,Max(994):1.01701894889,Min(2):0.0293058087336,Average:0.352133845124
MEM(Total:52.2060125065,Max(994):1.01701894889,Min(2):0.0293058087336,Average:0.0522060125065
MEM to GDB:2.62204624813
OGR(Total:37.934927268,Max(994):1.01701894889,Min(1):0.0222360889709,Average:0.037934927268
Deleting feature classes...
Feature classes deleted.&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The values in parentheses are the iteration at which the min/max occurred.&amp;nbsp; Thanks for the help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[0] &lt;/SPAN&gt;&lt;A href="http://en.wikipedia.org/wiki/Schlemiel_the_Painter" s_algorithm="s_algorithm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://en.wikipedia.org/wiki/Schlemiel_the_Painter's_algorithm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:01:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147785#M5022</guid>
      <dc:creator>KyleShannon</dc:creator>
      <dc:date>2021-12-11T08:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Poor performance with FileGDB and AddField_management</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147786#M5023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ouch... Can't hide from the numbers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FYI: A lot of the ESRI geoprocessing tools exhibit this behavior (consistently longer run times) when run in a loop. It used to be &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;FAR&lt;/SPAN&gt;&lt;SPAN&gt; worse, and to their credit, ESRI has made great strides in correcting/minimizing the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=177007"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=177007&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=175721"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1729&amp;amp;t=175721&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/8866-Spatial-Join-CRASHING-at-10"&gt;http://forums.arcgis.com/threads/8866-Spatial-Join-CRASHING-at-10&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The gp "memory leak" might not be the underlying issue here though...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2011 15:36:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/poor-performance-with-filegdb-and-addfield/m-p/147786#M5023</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-12-01T15:36:00Z</dc:date>
    </item>
  </channel>
</rss>

