0

I'm CPU profiling a .NET Framework WebServer using PerfView and I noticed a lot of CPU time directly on System.Threading.Tasks.Task.ContinueWith. What does it mean? Should I worry about it?

Name  OTHER <<mscorlib.ni!System.Threading.Tasks.Task`1[System.__Canon].ContinueWith[System.__Canon](System.Func`2,System.__Canon>)>>        
Exc % 10.0     
Exc   1,539  
Inc % 10.0     
Inc   1,539
  • Is it definitely that function and not something in the subtree? Are you awaiting something in a very tight loop? – Charlieface Feb 25 '21 at 14:00
  • Unfortunately Perfview didn't report anything on the subtree. This code was on a Nuget package - I decompiled it and explored the misterious stack. Turns out it seems there was lots of things being done on a `Task.ContinueWith` - I changed the code to cache the calls to this lib and then I got a performance gain! Looking to remove this lib in the future – Tiago Nápoli Feb 26 '21 at 15:55

0 Answers0