0

I'm computing heavy (100000) matrix computations(like multiply/add/substract). When I do it in simple console application it's performance is fine.

But when I place same code in simple asp.net web application and invoking process in button click,it's taking too much time.

Using .Net 4.5 and VS 2013 for both console app and asp.net web application.

Do I need to take care of anyother things?

malkam
  • 2,337
  • 1
  • 14
  • 17
  • Where are you measuring the performance - in the code or in the browser? Can you provide a small sample? – StingyJack Jul 22 '15 at 17:41
  • @StingyJack I am starting timer and calculating duration. In console app writing to console and in web app showing total duration in simple label – malkam Jul 22 '15 at 18:22
  • Could you provide the following values for both cases? Control.LinearAlgebraProvider.ToString(), Control.MaxDegreeOfParallelism, Control.TaskScheduler.GetType().FullName, Control.TaskScheduler.MaximumConcurrencyLevel, Control.BlockSize – Christoph Rüegg Jul 22 '15 at 20:11
  • Both have below same values. Provider: Intel MKLX86 ,Parallelism:4,Scheduler:Tasks.ThreadPoolTaskScheduler, Concurrency:2147483647,Block size:512. Do I need to tweak any IIS settings to get better results. Using Parallel.For loop to compute calculations parallelly. – malkam Jul 23 '15 at 09:17
  • You should be using System.Diagnostics.Stopwatch() to time the execution of only the computation function, and only when operating in Release compilation. Any other timing method will either not be precise, or will include additional parts (like the ASP.NET processing pipeline). – StingyJack Jul 23 '15 at 13:29

0 Answers0