<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Performance consideration</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2012 : Performance consideration</description>
  <pubDate>Fri, 24 Apr 2026 15:31:14 -700</pubDate>
  <lastBuildDate>Thu, 03 Oct 2013 10:44:01 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=4359</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Performance consideration : sent you a pm </title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=17008#17008</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1623" rel="nofollow">kdev</a><br /><strong>Subject:</strong> 4359<br /><strong>Posted:</strong> 03-Oct-2013 at 10:44am<br /><br />sent you a pm]]>
   </description>
   <pubDate>Thu, 03 Oct 2013 10:44:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=17008#17008</guid>
  </item> 
  <item>
   <title>Performance consideration : kdev, is there any chance you...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=17006#17006</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 4359<br /><strong>Posted:</strong> 03-Oct-2013 at 7:04am<br /><br />kdev, is there any chance you can send us the code snippet and Fiddler session archive for this?&nbsp; ]]>
   </description>
   <pubDate>Thu, 03 Oct 2013 07:04:42 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=17006#17006</guid>
  </item> 
  <item>
   <title>Performance consideration : Ok. Let me know if you want I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=16930#16930</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1623" rel="nofollow">kdev</a><br /><strong>Subject:</strong> 4359<br /><strong>Posted:</strong> 27-Sep-2013 at 11:05am<br /><br />Ok. Let me know if you want I do some specific test on my side.]]>
   </description>
   <pubDate>Fri, 27 Sep 2013 11:05:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=16930#16930</guid>
  </item> 
  <item>
   <title>Performance consideration : Thanks, kdev. We don&amp;#039;t see...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=16929#16929</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 4359<br /><strong>Posted:</strong> 27-Sep-2013 at 11:03am<br /><br />Thanks, kdev.&nbsp; We don't see the numbers you're seeing, but the SL query metrics aren't as good as we'd like, and we're investigating further.]]>
   </description>
   <pubDate>Fri, 27 Sep 2013 11:03:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=16929#16929</guid>
  </item> 
  <item>
   <title>Performance consideration : I should add that the performance...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=16927#16927</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1623" rel="nofollow">kdev</a><br /><strong>Subject:</strong> 4359<br /><strong>Posted:</strong> 27-Sep-2013 at 9:04am<br /><br />I should add that the performance issue hits every different query, not only the first query executed.<div>as shown in the post above, if you remove the 600ms due to the preloader, you will see that the dummy query has also this problem.</div>]]>
   </description>
   <pubDate>Fri, 27 Sep 2013 09:04:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=16927#16927</guid>
  </item> 
  <item>
   <title>Performance consideration : Hi kimj,I did as you suggested,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=16926#16926</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1623" rel="nofollow">kdev</a><br /><strong>Subject:</strong> 4359<br /><strong>Posted:</strong> 27-Sep-2013 at 8:13am<br /><br /><div>Hi kimj,</div><div><br></div><div>I did as you suggested, I &nbsp;ran a "dummy" query first. This query dummy also handle the time (~600ms) induced by the preloader (also named GlobalCache in TempHire).</div><div><br></div><div>I did those tests in QueryStrategy.DataSourceOnly to be sure I don't add extra data/time with inversion mode and don't use the cache. Here is what I get :</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>(EM N°1)</div><div>Query dummy : 954.0093 ms</div><div>My real query on ID = 1 &nbsp;: 484.0038 ms</div><div></pre></td></tr></table></div><div><br></div><div>then</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>(EM N°2)</div><div>Query dummy : 704.0043 ms</div><div>My real query on ID = 2 &nbsp;: 207.0322 ms</div><div></pre></td></tr></table></div><div><br></div><div>then I test again Id == 1</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>(EM N°3)</div><div>Query dummy : 690.028 ms</div><div>My real query on ID = 1 &nbsp;: 212.0012 ms</div><div></pre></td></tr></table></div><div><br></div><div><br></div><div>Now I start a new session of my application and I do the same test but in inverted order (to rule out the fact that of the the query might really be faster thant the other one)</div><div><br></div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>(EM N°1)</div><div>Query dummy : 950.9732 ms</div><div>My real query on ID = 2 &nbsp;: 551.0041 ms</div><div></pre></td></tr></table></div><div><br></div><div>then</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>(EM N°2)</div><div>Query dummy : 695.9999 ms</div><div>My real query on ID = 1 &nbsp;: 236.0045 ms</div><div></pre></td></tr></table></div><div><br></div><div><span style="line-height: 1.4;">then I test again Id ==</span><span style="line-height: 1.4;">&nbsp;</span>2</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>(EM N°3)</div><div>Query dummy : 698.433 ms</div><div>My real query on ID = 2 &nbsp;: 209.0148 ms</div><div></pre></td></tr></table></div><div><br></div><div><br></div><div>Note : I did test on a query with many includes. the "normal" time was ~1500ms while the "initial" time was ~3100ms.&nbsp;</div><div>This "initial" time seems proportionnal to the "normal" time.</div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Fri, 27 Sep 2013 08:13:42 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=16926#16926</guid>
  </item> 
  <item>
   <title>Performance consideration : First, I&amp;#039;m always suspicious...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=16912#16912</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 4359<br /><strong>Posted:</strong> 25-Sep-2013 at 6:50pm<br /><br />First, I'm always suspicious of a first execution time.&nbsp; If the EntityManager is not connected and/or logged in, the first query will also wait for the connection to complete and then perform a LoginAsync.&nbsp; If the EntityServer is not already running and started with this first connect, then there's additional overhead while this is done.&nbsp; Also, the first query will cause various other initialization actions on both the client and server, usually the loading of metadata.&nbsp; So, I always "prime" an EntityManager with an initial query before running my "real" test. <DIV sab="959">&nbsp;</DIV><DIV sab="960">In your case, the fact that subsequent execution times were significantly less than the first execution leads me to think that you're seeing this overhead.</DIV><DIV sab="961">&nbsp;</DIV><DIV sab="962">Next, 200ms for a query returning no results does seem high, but a) this is Silverlight, b) the query is serialized to your EntityServer, c) the EntityServer asks EF to execute the query, d) EF sends the SQL query to the database server, e) the database runs the query, and e) the results, even if empty, are transmitted back through this pipeline.&nbsp; So, a lot of activity still takes place.&nbsp; I'd also try running in a release configuration in both SL and the web application to see if that helps.&nbsp; You can also try profiling the query, with a 3rd party tool or by adding additional tracing messages, to see if there's a specific problem area.</DIV>]]>
   </description>
   <pubDate>Wed, 25 Sep 2013 18:50:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=16912#16912</guid>
  </item> 
  <item>
   <title>Performance consideration : Hi,I am having very poor performance...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=16889#16889</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1623" rel="nofollow">kdev</a><br /><strong>Subject:</strong> 4359<br /><strong>Posted:</strong> 25-Sep-2013 at 4:39am<br /><br /><div><span style="line-height: 1.4;">Hi,</span></div><div><br></div><div>I am having very poor performance on querying from a SL Client (using cocktail). I am in a dev environnement.</div><div>For instance, trying to retreive one entity + 3 level of navigation property (entity.Nav1.Nav2.Nav3) takes near 500ms (happened to hit 800ms) while the SQL query takes only 11ms on SQL server.</div><div>In this exemple Nav1 and Nav3 are a RelatedEntityList and Nav2 is a NavigationProperty. My tables are pretty empty (one or 2 records max)</div><div><br></div><div>The repository use QueryStrategy.DataSourceOnly</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>var entite = await _entiteRepository.FindAsync(p =&gt; p.Id == Entite_Id,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cancellationToken,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fetchOptions: options =&gt; options.Include(Entite.EntityPropertyNames.LinkEntiteToParam));</div><div></pre></td></tr></table></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div><font face="Courier New, Courier, mono">1st execution &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</font></div><div><font face="Courier New, Courier, mono">Elapsed time : 467.0034 ms</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">2nd execution (same EM, same Entite_Id)</font></div><div><font face="Courier New, Courier, mono">Elapsed time : 203.0475 ms</font></div><div><font face="Courier New, Courier, mono"><br></font></div><div><font face="Courier New, Courier, mono">3rd execution (different EM, different Entite_Id)</font></div><div><font face="Courier New, Courier, mono">Elapsed time : 216.054 ms</font></div><div><br></div><div>Removing the Include give pretty much the same result.</div><div><br></div><div>Question 1 : using query inversion OFF why the elapsed time double on the first query ?</div><div>question 2 : I find 200ms quite high, more specially when it return 0 entity. Are those time normal at all ?</div><div><br></div><div>Note: I tried on Temphire, using the sentence below, to query a non existing entity. It did cost ~150ms each time.</div><div><table width="99%"><tr><td><pre class="BBcode">ActiveUnitOfWork.StaffingResources.FindAsync(p =&gt; p.Id == Guid.NewGuid(), fetchOptions: opt =&gt; opt.Include(p =&gt; p.Skills));</pre></td></tr></table></div><div><br></div>]]>
   </description>
   <pubDate>Wed, 25 Sep 2013 04:39:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4359&amp;PID=16889#16889</guid>
  </item> 
 </channel>
</rss>