<?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: Performance problems when updating a Field in a feature class with different values for each row in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1036727#M6347</link>
    <description>&lt;P&gt;I'd be curious what performance gains you'd get by moving from file geodatabase to a sqlite geodatabase, and using something like&amp;nbsp;microsoft.data.sqlite to do the updates.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Mar 2021 17:27:21 GMT</pubDate>
    <dc:creator>KirkKuykendall1</dc:creator>
    <dc:date>2021-03-15T17:27:21Z</dc:date>
    <item>
      <title>Performance problems when updating a Field in a feature class with different values for each row</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1035867#M6332</link>
      <description>&lt;P&gt;Hi, I am trying to update a field with different values for each row in a feature class. I have already found a solution, but the performance is pretty slow for feature classes containing more than 10.000 Features. For instance, in a feature class with 100.000 features it may take approximately 3 minutes.&lt;/P&gt;&lt;P&gt;For the time being I am using a &lt;STRONG&gt;cursor&lt;/STRONG&gt; obtained by calling&amp;nbsp; the search function in the FeatureClass object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;             using (Geodatabase geodatabase = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(fgdbPath))))
                {
                    using (FeatureClass table = geodatabase.OpenDataset&amp;lt;FeatureClass&amp;gt;(fcName))
                    {
                        var cursor = table.Search(new QueryFilter()
                        {
                            SubFields = "OBJECTID, field"
                        }, false);
                        while (cursor.MoveNext())
                        {
                            var row = cursor.Current;
                            row["field"] = dictionary[(long) row["OBJECTID"]];
                            row.Store();
                        }
                    }
                }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an alternative to update a field faster than Cursor or perhaps I am missing something in the way I use the &lt;STRONG&gt;cursor&lt;/STRONG&gt;?.&lt;/P&gt;&lt;P&gt;I also tried running the geoprocess Join Field which runs way faster than using the &lt;STRONG&gt;cursor&lt;/STRONG&gt;, but in that case an intermediate table&amp;nbsp;must be created in first place and later replace the new field for the old field.&lt;/P&gt;&lt;P&gt;Any suggestion is welcome. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 11:26:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1035867#M6332</guid>
      <dc:creator>Eloy</dc:creator>
      <dc:date>2021-03-12T11:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problems when updating a Field in a feature class with different values for each row</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1036155#M6340</link>
      <description>&lt;P&gt;Hi Eloy,&lt;/P&gt;&lt;P&gt;Is the feature class you are editing has any relationship classes with messaging enabled, you might want to use an edit session (i.e., Geodatabase.ApplyEdits). &amp;nbsp;Otherwise, what you are doing is the fastest way currently. We are investigating creating an UpdateCursor class in a future version of Pro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 22:11:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1036155#M6340</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2021-03-12T22:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problems when updating a Field in a feature class with different values for each row</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1036606#M6345</link>
      <description>&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;Thanks for answering. The feature class has not relationship class with messaging enbled. An update cursor would be super userful.&lt;/P&gt;&lt;P&gt;Eloy.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 14:00:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1036606#M6345</guid>
      <dc:creator>Eloy</dc:creator>
      <dc:date>2021-03-15T14:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problems when updating a Field in a feature class with different values for each row</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1036727#M6347</link>
      <description>&lt;P&gt;I'd be curious what performance gains you'd get by moving from file geodatabase to a sqlite geodatabase, and using something like&amp;nbsp;microsoft.data.sqlite to do the updates.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 17:27:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1036727#M6347</guid>
      <dc:creator>KirkKuykendall1</dc:creator>
      <dc:date>2021-03-15T17:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problems when updating a Field in a feature class with different values for each row</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1334881#M10507</link>
      <description>&lt;P&gt;Regarding the &lt;STRONG&gt;Subfields&lt;/STRONG&gt; property and &lt;STRONG&gt;Updating&lt;/STRONG&gt; rows&lt;BR /&gt;I'm not sure if this is in the documentation.&lt;/P&gt;&lt;P&gt;But for anyone that experience the Pro SDK crash on row.Store().&lt;BR /&gt;&lt;STRONG&gt;Make sure to include ObjectID in subfields.&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 12:33:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1334881#M10507</guid>
      <dc:creator>AndersHansen80</dc:creator>
      <dc:date>2023-10-04T12:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Performance problems when updating a Field in a feature class with different values for each row</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1341737#M10602</link>
      <description>&lt;P&gt;Regarding the Pro SDK crash on &lt;STRONG&gt;Row.Store()&lt;/STRONG&gt;, not only without the &lt;STRONG&gt;ObjectID&lt;/STRONG&gt;; the crash will occur if other attribute or relationship fields associated with the edited field are unavailable in the search cursor. Therefore, using a search cursor inside the edit session, scope to edit operation is the recommended way to update rows.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 22:59:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/performance-problems-when-updating-a-field-in-a/m-p/1341737#M10602</guid>
      <dc:creator>Aashis</dc:creator>
      <dc:date>2023-10-25T22:59:49Z</dc:date>
    </item>
  </channel>
</rss>

