I noticed that when running WSMQ under a low trust account, the application is initially very slow
to respond. Eventually, things seem to return to
normal, but whenever the aspnet worker process is restarted,
the application is again sluggish for a time period. I
couldnât figure out what was causing this slowness. It wasnât my
SQL server connection, it wasnât simple assembly caching. Something was
timing out, then getting cached, but what?
Like all their tools, I highly, highly recommend ANTS Profiler. Raymond has a great review of ANTS here.
Their SQL and ANTS tools should be an essential component of
any .NET developers suite of tools. Oh, and thereâs a period at
the end of that sentence.
ANTS Profiler⢠is the simple .NET profiler that pinpoints slow
lines of code in .NET applications and helps you understand how your
application is using memory.
Anyhow, when I fired up ANTS, I noticed that when I run WSMQ under a low-trust account, a call to the WMIâs IWebmLocator.ConnectServer is being made, and it's taking up 45 seconds during a simple profiling session!
So, I started looking into code and found that even though I only
had the Data Access Application Block configured, it was in fact,
making WMI instrumentation calls. This will require running under
a high-trust account, something that I couldnât require with an app
that is designed to be deployed anywhere, even on a trusty WebHost4Life account.
I don't recommend it, but if you really want to you can also
disable all of the WMI and performance counter instrumentation in
Enterprise Library. This requires a recompile of Enterprise Library,
and you will lose valuable performance monitoring data.
Well, I do really want to do it, so here was my solution:
Open the the EnterpriseLibrary.sln and modify the Configuration
Properties\Build\Conditional Constants of the
EnterpriseLibrary.Common project. I had to remove the conditional
build constants that were mentioned in @bazâ post.
The point of this post? I would have never even known where to
look without ANTS! This is really a great tool.
Thanks Red-Gate!