Over a million developers have joined DZone.

Garbage Collection and .NET Debugging at Build Stuff

· Agile Zone

Reduce testing time & get feedback faster through automation. Read the Benefits of Parallel Testing, brought to you in partnership with Sauce Labs.

I spent most of last week at Build Stuff, a really cool software conference in Vilnius, Lithuania. The conference was great with a really exciting atmosphere: energized, passionate developers having conversations and playing table tennis in the hallways during the day, and drinking lots of beer in the evenings. Even the weather was quite nice — there was only a little snow, and temperatures didn’t drop below -1 Celsius, which means we could walk around the old town’s historical landmarks; grab some sushi, ribs, and beer; and do some window shopping. So, a great success!

I was invited to deliver a talk on .NET garbage collection and a workshop on debugging .NET applications. Below are some materials from these sessions that you might find useful. I also promised a few more in-depth links on garbage collection; see below.

.NET Garbage Collection Performance Tips (breakout session)


This talk was focused on several techniques for improving GC performance and reducing memory pressure. I talked about generations and GC flavors — server GC being probably the most reasonable flavor to use in 2014 — and explained how to minimize allocations using value types and object pooling. Towards the end of the talk I mentioned some serious issues with finalization, and how I prefer deterministic finalization with the Dispose pattern. Now, 55 minutes are obviously not enough to cover such a vast topic, so if you’re still eager to learn more, I recommend that you check out Pro .NET Performance or my Pluralsight courses.

Debugging .NET Applications (workshop)


This workshop revolved around three topics: capturing dump files automatically in production environments, performing automatic dump analysis and debugging using ClrMD, and obtaining production performance information with ETW and PerfView. I’ve really enjoyed the student interactions during this lab, and I hope the labs have been effective for convincing everyone that automatic error analysis and triage are a reality in 2014.

Thanks for coming, and I’m actually looking forward to another visit to wintery Vilnius — which is a notion I’d dismiss as laughable just a couple of weeks ago!

I am posting short links and updates on Twitter as well as on this blog. You can follow me: @goldshtn

The Agile Zone is brought to you in partnership with Sauce Labs. Discover how to optimize your DevOps workflows with our cloud-based automated testing infrastructure.


Published at DZone with permission of Sasha Goldshtein, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}