Skip to content

Using Redgate’s ANT .net Profile, Nails Memory Problem in 5 Minutes!

Updated: at 02:12 PM

I recently added a cool new feature to our Silicon Valley Code Camp web site that lets attendees authenticate their accounts with the meetup OAuth api and then we track the meetups that add us (SVCC) as a sponsor.  We then do a nice aggregation on the bottom of all our web pages, and one dedicated meetup page (http://www.siliconvalley-codecamp.com/meetup) of all those sponsors.  After adding this new feature (and sending out 10,000 emails announcing it), our web site started running out of memory.  Ouch!

With 5 minutes of installation and setup, I skipped reading the tutorials, just said launch the site with my IIS Express.  I pointed ANT at the base of my web site, told ANT I was using IIS Express and then simply said “Start Profiling Memory”.  It launch a browser and showed me a graph showing my memory climbing past a gig.   pushed the “take snapshot” button and instantly I could see where all my memory was going. 

Bottom line is I was databasing the raw JSON file which is really unnecessary and it was getting quite large.  I’m going to stop doing that and I’m betting my problem goes away.

You can see the graph ANT created for me with the offending memory allocation.  Nailed it!  Nice job Redgate.  Jus what I’ve come to expect from those guys.

image

That’s it for now!

Check out the ORM (Object Relational Mapper) PRISMA. The database access method I use in all my projects