While monitoring performance counters during the load test of a .NET web application, the default critical threshold of 10 was constantly exceeded for a counter called "% Time in RT checks".
Why is it bad to spend a lot of time doing runtime checks?
What might this say about our application?
How should this be improved?
This threshold is not necessarily indicative of bad performance (depending on what else you are doing, 10% of your processing time may not be very much!).
There is another related counter, "Total Runtime checks." This counter displays the actual count of runtime checks (it is documented here). If the value in that counter is low, then the likelihood is that you don't have an issue. If it's high (or increases rapidly at certain points in your app) then you may have an issue worth investigating.
These "runtime checks" are the code access security checks that are made when your code asks for a specific CAS permission from the runtime. If your code is complex or runs under limited trust, you may find that you are making many requests and that you can potentially restructure your code to optimise these. However, I'd be sure to identify that this is an issue before looking too deeply, as it's not always a straightforward optimisation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With