How to understand performance problems in "Native or Optimized code" when using DotTrace Performance
Asked Answered
B

1

8

I am using DotTrace Performance (v 5.5.4) on my web application. I am trying to optimize the page load time after cold starting the MVC 5 application. Looking at the main thread on the snapshot, it seems like majority of the work is being done in "Native or Optimized code". Thats seems a little too generic and is not really helpful. What does that really mean and how do I dig into it further?

enter image description here

Note : I found a similar post on the jetbrains forum but there did not seem to be any resolution posted there either.

Basilio answered 17/8, 2015 at 13:50 Comment(1)
It looks like something that is part of the underlying framework. Optimized or native code means that the code has been JIT-ed and is running natively so normal .NET inspection techniques can't view the running code (its basically machine code). I'd guess that the code is something that is waiting for network or disk I/O which you wouldn't be able to optimize anyway, or it could just be a spin-wait of some sort.Matrilineal
D
1

Probably it is JITting time there. Does the second opening of same page also takes much time? Maybe you have opportunity to use dotTrace 6.1+? It has Timeline mode that can show thread states, distribution by File I/O, Jit, GC times on any time range. It might reveal the underneath native activity on that thread.

Denni answered 26/8, 2015 at 11:6 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.