A pragmatic programmer

5 notes &

Profiling orchard with Eqatec Profiler

I can’t seem to get Red-Gate Ants Performance Profiler to attach to the right website. If I let it attach to IIS directly, it restarts IIS in .net2.0 mode instead of .net4.0. When I let it create its own webserver, I do get .net4.0, but am welcomed with the message “Operation could destabilize the runtime" in the WarmupHttpModule constructor. Not very comforting.

Luckily a colleague showed me Eqatec Profiler. It works really ingenious: it re-compiles selected DLL’s, injecting profiling logic into them. This should work nicely with Orchard CMS.

So I want Eqatec to handle the Orchard Core, and installed modules. First problem occurs: the modules are dynamically compiled. As Eqatec can only handle DLL files that are in the same folder, I made references from Orchard.Web to the modules I wanted to investigate. This is my config for Eqatec:

Eqatec Orchard configuration

All I have to do now is click “Build”, the selected dll’s are re-compiled and when I surf to my website (http://localhost) I see logs coming in in the “Run” tab. I don’t want to profile the start-up costs of Orchard, so I’ll refresh my browser a couple of times, then hit “reset counters”, refresh twice, and click “take snapshot”.

Eqatec Orchard profiling output

Perfect! This overview tells us the BuildDisplay was called 4 times, resulting in a total time of nearly 600ms that it took. And The repository did 126 database GetById() calls. And a whopping 316.100 time IsCurrent() on an IVolatileToken

So we’ve got some pointers on where to look for performance fixes ;)

ps. Eqatec has a time limited campaign where you can get a Corporate license worth $999 for free!

  1. developer3l posted this