SIGN UP MEMBER LOGIN:    
TIPS

Is your code a resource pig?

Posted by Mahesh Chand in Tips on Apr 07, 2007
Are you sure your code is doing what it supposed to without taking too much time and consuming too much resources? Check it out here.

Due to hectic deadlines and work load, there are times when we forget to go back, revisit our code, and refactor it. So how do you make sure the code is doing what it supposed to without taking too much time or consuming too much resources?

Recently, I got a chance to work on a Web application, that was very slow in performance specially when multiple users were accessing the application simultaneously. It was a big challange for me to find out what part of code is taking too much time since I never worked on that project.

First method for me was to revisit the code line by line, understand and evaluate it, debug line-by-line, and refacor it. As you may guess, this process would have taken me days and weeks.

The simplest method I found was ANTS Profiler. I downloaded a FREE trial but fully-functional version of ANTS Profiler, installed it and profiled my application using it. It took me total 30 minutes to do all this. After 30 mins, I got the results exactly I was looking for. ANTS Profiler told me what lines of code were taking how much time and sort listed the slowest methods and lines of code for me.

I would highly recommend you to download a trial version of ANTS Profiler and give it a try. Guess what? Tool costs less than $300. If it saves you couple of hrs work, it's worth giving it a try. Download it here.

 

share this tip :
Sponsored by
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
  • Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
    Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Sponsored by
Team Foundation Server Hosting
Become a Sponsor