<?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 : ExecuteAsync is not async</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : ExecuteAsync is not async</description>
  <pubDate>Mon, 13 Apr 2026 12:29:28 -700</pubDate>
  <lastBuildDate>Thu, 28 Jul 2011 09:15:50 -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=2844</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>ExecuteAsync is not async :   There are two parts to an...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2844&amp;PID=11323#11323</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> 2844<br /><strong>Posted:</strong> 28-Jul-2011 at 9:15am<br /><br />There are two parts to an async query: &nbsp;the actual query execution where the request is sent to the server and the results are received, and the merge of these results into cache.&nbsp; The first part is always performed on a background thread, the second part, the merge into cache, is always performed synchronously on the main thread.&nbsp; The merge must be performed synchronously because the EntityManager itself is not thread safe, and you may have other queries, saves or edits underway.&nbsp; The merge might be slow if a large number of entities of the queried type are already loaded into cache.&nbsp; As the merge is performed a number of events can be fired too, so if you have handlers in place, such as PropertyChanged, EntityChanged, EntityGroupChanged, that could affect performance.&nbsp;<div>&nbsp;</div><div>Generally, if you re-execute exactly the same query when using the "Normal" query strategy the EntityManager will run a CacheOnly query.&nbsp; Even when called via ExecuteAsync the CacheOnly query will complete synchronously, and since the actual cache contents haven't changed no merge is performed and this should be fast.&nbsp; If you're doing a CacheOnly query and seeing the UI freeze then the problem may be in how you're re-loading the collection or performing the data binding.&nbsp; </div><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Thu, 28 Jul 2011 09:15:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2844&amp;PID=11323#11323</guid>
  </item> 
  <item>
   <title>ExecuteAsync is not async : Hello,We are using DevForce and...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2844&amp;PID=11278#11278</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1185" rel="nofollow">GeertvanHorrik</a><br /><strong>Subject:</strong> 2844<br /><strong>Posted:</strong> 25-Jul-2011 at 12:45am<br /><br />Hello,<div><br></div><div>We are using DevForce and have a question regarding the cache and asynchronous behaviors. We have created a grid view and loading customers into the grid. The first time, it all works like a charm and the UI stays responsive during the retrieval of the data.</div><div><br></div><div>However, the 2nd time when we refresh the grid (and execute the same query, just a select all), the UI freezes for a bit (2 or 3 seconds). What seems, if we change the query strategy, the issue goes away:</div><div><p ="Mso"><span lang="EN-US">_manager.DefaultQueryStrategy= new QueryStrategy(FetchStrategy.DataSourceOnly,MergeStrategy.OverwriteChanges);<o:p></o:p></span></p><p ="Mso">However, this solution is not acceptable because this requires the user to retrieve all data from the database instead of the local cache.</p><p ="Mso">Our question is: is there a way to truly execute the query async and let the cache determination be async as well.</p><p ="Mso"><br></p><p ="Mso">Thanks in advance.</p></div>]]>
   </description>
   <pubDate>Mon, 25 Jul 2011 00:45:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2844&amp;PID=11278#11278</guid>
  </item> 
 </channel>
</rss>