<?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 Modifying graphics symbols in AcceleratedDisplayLayers slow compared to non accelerat in ArcGIS Runtime SDK for WPF (Retired) Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/modifying-graphics-symbols-in/m-p/761052#M3793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been trying to visualize a large scale network (20.000+ elements) in WPF and have some questions regarding the performance of the new Runtime.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Somehow there seems to be a trade-off in performance of a regular grahpicslayer, and an accelerated graphicslayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;WPF: (20.000 lines on screen)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- This moves very slow, and zooming/panning etc is cumbersome. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Updating the stroke of all the lines in view or getting the FindGraphicsInHostCoordinates lets say 10 times per second, it is very fast.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Accelerateddisplay: (20.000+ lines on screen)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- This moves very fluently and performs really well both when zooming and panning.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Updating the stroke of all the lines or trying to call findgraphicsinhostcoordinates is very slow I can't even get once per second updates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the question is: what am I doing wrong, or is this a feature?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: I've been trying to figure some things out. Main conclusion for now is: just setting the brush of all elements (20.000) takes a second (without doing anything else) in both WPF and Accelerated mode. So the trick seems be somewhere else. It looks like graphicslayer.FindGraphicsInHostCoordinates does not work properly in Accelerateddisplay.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My code: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
var graphics = glayer.FindGraphicsInHostCoordinates(new Rect(0, 0, Application.Current.MainWindow.Width, Application.Current.MainWindow.Height), 1000);
foreach (var g in graphics)
{
&amp;nbsp;&amp;nbsp; var pidx = (int)g.Attributes["index"];
&amp;nbsp;&amp;nbsp; var r = Simulation.TagValues["pressure"][pidx, timeindex];
&amp;nbsp;&amp;nbsp; var brush = GetColor(r);
&amp;nbsp;&amp;nbsp; var sym = g.Symbol as SimpleLineSymbol;
&amp;nbsp;&amp;nbsp; if (sym != null)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sym.Color = brush;
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Mar 2013 12:29:39 GMT</pubDate>
    <dc:creator>JeroenBroekhuijsen</dc:creator>
    <dc:date>2013-03-05T12:29:39Z</dc:date>
    <item>
      <title>Modifying graphics symbols in AcceleratedDisplayLayers slow compared to non accelerat</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/modifying-graphics-symbols-in/m-p/761052#M3793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been trying to visualize a large scale network (20.000+ elements) in WPF and have some questions regarding the performance of the new Runtime.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Somehow there seems to be a trade-off in performance of a regular grahpicslayer, and an accelerated graphicslayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;WPF: (20.000 lines on screen)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- This moves very slow, and zooming/panning etc is cumbersome. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Updating the stroke of all the lines in view or getting the FindGraphicsInHostCoordinates lets say 10 times per second, it is very fast.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Accelerateddisplay: (20.000+ lines on screen)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- This moves very fluently and performs really well both when zooming and panning.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Updating the stroke of all the lines or trying to call findgraphicsinhostcoordinates is very slow I can't even get once per second updates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So the question is: what am I doing wrong, or is this a feature?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: I've been trying to figure some things out. Main conclusion for now is: just setting the brush of all elements (20.000) takes a second (without doing anything else) in both WPF and Accelerated mode. So the trick seems be somewhere else. It looks like graphicslayer.FindGraphicsInHostCoordinates does not work properly in Accelerateddisplay.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My code: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
var graphics = glayer.FindGraphicsInHostCoordinates(new Rect(0, 0, Application.Current.MainWindow.Width, Application.Current.MainWindow.Height), 1000);
foreach (var g in graphics)
{
&amp;nbsp;&amp;nbsp; var pidx = (int)g.Attributes["index"];
&amp;nbsp;&amp;nbsp; var r = Simulation.TagValues["pressure"][pidx, timeindex];
&amp;nbsp;&amp;nbsp; var brush = GetColor(r);
&amp;nbsp;&amp;nbsp; var sym = g.Symbol as SimpleLineSymbol;
&amp;nbsp;&amp;nbsp; if (sym != null)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sym.Color = brush;
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2013 12:29:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-wpf-retired-questions/modifying-graphics-symbols-in/m-p/761052#M3793</guid>
      <dc:creator>JeroenBroekhuijsen</dc:creator>
      <dc:date>2013-03-05T12:29:39Z</dc:date>
    </item>
  </channel>
</rss>

