I'm thinking of using ngen to improve start up performance of my .net
service. I have seen it fail to start with a 30 second timeout error on boot,
without even getting to the first line of code. This happens on slow
computers, especially with anti-virus software installed.
QUESTION: The documentation says I need to pick non-overlapping baseaddresses.
Even if the base addresses I pick don't conflict with eachother, is it
possible that the base addresses will conflict with another application on
the computer? If so, isn't using ngen a futile effort because I have no
control over the base addresses used my other programs.
QUESTION: I think I need to measure the time it takes my service to start
during boot. If I try to start my service manually later, it starts very fast
- maybe 1 or 2 seconds. For some reason the cold start at boot is much
slower, occasionally longer than 30 seconds. I want to measure whether the
changes I make improve start up time but don't know how to measure it. I've
measured the time from the first line in Main() to the end of OnStart but
this clearly isn't the right metric, because it can be more than 30 seconds
without causing a timeout. And there are times I've gotten the timeout error
without the first line of Main() being invoked.