I'm not quite sure which part of the method consumes this a lot of time. So I would like to measure it
Things that take a lot longer than they should be very easy to find .
For example, if it takes 10 times longer than it should, it means that in 90% of cases it does something unnecessary. So, if you run it under the IDE and pause it, the probability that you will catch it in action is 90%. Just look at the call stack because you know that the problem is somewhere on it. If you are not sure you caught him, try several times. The problem will appear on several samples.
Typical things I found in running a .net application:
- Finding resources like international strings is useless.
- Tracking notification trees in data structures is unnecessary.
What you find will probably be different, but you will find it.
This is a low-tech but effective method. It works whether the time is wasted in the CPU or in I / O. This does not measure the problem very accurately, but it accurately defines it. (Check out the last paragraph of this post .)
Mike dunlavey
source share