I have a project I have been working on wrapping up. We have gotten tons of user feedback, which thrills me to know that my tool will get used. On my list of items needing attention, however, one item loomed largely. I ignored the item for as long as I could. I cleared up everything else, and I had no choice but to stare my arch-nemesis directly in the face: performance. "Yikes", I murmured to myself, trembling. There were so many controls on my page, there were so many domain object getting loaded, the task of finding the offending performance hog seemed to be a huge undertaking. I fretted, I greived, and then I pulled myself out of my self-pity mode and came up with a plan.
From the good old days of .net Beta, when stepping through code without running into environment hang ups was only a distant fantasy, I remember my friend, Trace. So I set Trace=True in my aspx file, and went to town adding Trace.Write lines to my code. I began to get excited as I awaited my first trace output. I could envision the lines I would see, tellling me the expanded time that each snippet of my code began and ended execution. Lo and behold, when I saw the first Trace output, my troubles were over. I saw the offending control was something leftover from pre-version one of my form. This slow control was loading up over 50 times. I slashed the control from my code, and my page now loads about 60 times faster. Hooray! I have defeated the performance tyrant. So, in appreciation of Trace's beautiful output, I have decided to write an Ode...
Ode to Trace
Before I used you, the performance of my page was a disgrace
Rather than troubleshoot, I would have preferred an eye full of mace
As my hour of deployment drew near, I was in a time-race
When, in a flash of brillance (okay, that may be arguable) I turned on Trace.
Seriously, maybe everyone else in the developement community is using Trace all of the time. I had forgotten about it, and I am SO GLAD I remembered to use it today :)
Wednesday, February 23, 2005
Subscribe to:
Post Comments (Atom)
1 comment:
Thanks :)
I know it was a dorky thing to write, but hey, I am a techie-geek so why not?
Post a Comment