<?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: Combobox AddItem performance in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/combobox-additem-performance/m-p/555510#M4007</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dag,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are finding that process intensive perhaps your device is not appropriate for your needs. I don't know what device you are using.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you using AXF data or shp files? Perhaps with AXF you can use SQL statements to update the table which might be quicker.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example have 1 table with everything in it. Have a duplicate table, but completely empty. Attach this to your combo box. When you make the change call a SQL command to update the empty table attached.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know how you go.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gareth&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Dec 2012 03:29:04 GMT</pubDate>
    <dc:creator>GarethWalters</dc:creator>
    <dc:date>2012-12-07T03:29:04Z</dc:date>
    <item>
      <title>Combobox AddItem performance</title>
      <link>https://community.esri.com/t5/arcpad-questions/combobox-additem-performance/m-p/555509#M4006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using combobox with dynamic content, i.e. I repopulate the combobox on other user actions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have trouble with the performance of AddItem operations. It is extremely CPU expensive. Some of my comboboxes have over 100 elements (bad UX, I know :-)).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a solution to this, other than to limit the number of items?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sample test code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
ctrl.Clear();
for (var i = 0; i &amp;lt; 500; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctrl.AddItem("desc" + i, "val" + i);
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2012 12:03:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/combobox-additem-performance/m-p/555509#M4006</guid>
      <dc:creator>Dag_MartinRomslo</dc:creator>
      <dc:date>2012-11-28T12:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Combobox AddItem performance</title>
      <link>https://community.esri.com/t5/arcpad-questions/combobox-additem-performance/m-p/555510#M4007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dag,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are finding that process intensive perhaps your device is not appropriate for your needs. I don't know what device you are using.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you using AXF data or shp files? Perhaps with AXF you can use SQL statements to update the table which might be quicker.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example have 1 table with everything in it. Have a duplicate table, but completely empty. Attach this to your combo box. When you make the change call a SQL command to update the empty table attached.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know how you go.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gareth&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 03:29:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/combobox-additem-performance/m-p/555510#M4007</guid>
      <dc:creator>GarethWalters</dc:creator>
      <dc:date>2012-12-07T03:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Combobox AddItem performance</title>
      <link>https://community.esri.com/t5/arcpad-questions/combobox-additem-performance/m-p/555511#M4008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The operation is CPU intensive on all devices I have tested on. Approximate benchmarking on my laptop shows that the operation requires 12 000 000 000 CPU cycles.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The method AddItemsFromTable() is much better. If I dynamically create a dbf from code and use this method, the same content requires 300 000 000 CPU cycles.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since I'm not using AXF, my solution to this is to use the second method described in cases where number of items are large.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 04:43:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/combobox-additem-performance/m-p/555511#M4008</guid>
      <dc:creator>Dag_MartinRomslo</dc:creator>
      <dc:date>2012-12-07T04:43:34Z</dc:date>
    </item>
  </channel>
</rss>

