3

Current context: We have a web page that requires multiple lists to be loaded in parallel and we decided to do that with Page.RegisterAsyncTask (once we do that we call Page.ExecuteRegisteredAsyncTasks(), the methods just load data, that will be rendered as JSON on render, and the page has the Async attribute set to true - so all should be fine) On our dev machines (win 7 and win 8) the performance is massively improved from 3 secs to under 1 sec.

Problem: Once deployed on the staging/live server (Windows 2008 R2) there are NO performance improvements compared to the non Async standard version.

Other solutions tried: We tried loading the tasks with Task.Factory.StartNew + Task.WaitAll on PageLoad on separate threads and same behavior is present on dev vs staging machines. Tried changing settings in machine.config on the staging server (though no restart done yet) ()

Questions: Has anyone encountered this issue and if so did you find a solution to it? Is it caused by the different thread scheduling algorithms from Win7/8 and Windows 2008 R2

MatthewMartin
  • 32,326
  • 33
  • 105
  • 164
  • 1
    This is just impossible to answer without further information I'm afraid. What are you doing in those async tasks ? Querying some webservice ? Are the task running asynchronously on staging ? Try putting log with timestamp when you load the list and try it on staging. Also you can look on aspnet:UseTaskFriendlySynchronizationContext app config settings. – Ondrej Svejdar Feb 25 '16 at 21:18

0 Answers0