Halving memory usage with ANTS Memory Profiler

Falafel Software, a provider of software and consulting solutions, were approached to build a data reporting tool for a leading commercial healthcare package. A Silverlight client provides a front-end to view maps, charts, and matrices based on complex dynamic data, and uses advanced visualizations to provide a rich user experience.

Falafel take the performance of their software seriously, and despite a tight deadline knew that memory leaks weren't an option.

"Quality Assurance testing revealed a series of memory leaks when users repeatedly logged out then back into the client without closing the host browser window," says Rachel Hagerman, Senior Software Engineer. "Continuous use in this manner eventually led to a memory shortage in the system, and browser failure."

Understanding what caused the leaks was another matter, and the complexity of the code meant that locating the source of the problem was taking time the team didn't have. That's when they tried ANTS Memory Profiler.

Less time diagnosing, more time improving

"Using ANTS Memory Profiler to test each control type used for data display over a logout/login cycle showed a pattern of leakage involving external event handlers which were not properly unassigned. Once we knew what was wrong the fix was easy."

ANTS Memory Profiler wasn't done yet. Within a short space of time the team were able to reveal a further series of smaller leaks they never knew they had.

"The Profiler revealed a continuous leak on refresh (a 30 second data update cycle within the Client), involving a set of List<String> objects that continued to grow throughout the use of the application. A simple fix to clear the list after data consumption eliminated the memory usage increase."

"The Profiler results showed an additional pattern of object re-creation on each navigation for the View pages within the application. Non-fragment URI usage within the Silverlight navigation framework was causing leaking objects, but was easily resolved by preparing each object for disposal."

Was it worth it?

Rachel thinks so. "The results were dramatic. Memory usage after a logout/login cycle for a typical usage scenario was reduced from 477MB to less than 240MB, an improvement of 49%."

From now on the team will be using it on all their applications. "It saved us tons of time, and should save us plenty more in the future."

Pricing
from $495
ANTS Memory Profiler is available as a standalone tool, or as part of the .NET Developer Bundle.



Volume discounts apply.
Got a question?
0800 169 7433
Download

Try a 14-day fully functional free trial of ANTS Memory Profiler.

What do people think?

I purchased ANTS Profiler as I knew I had a memory leak in my code and I could see this with Task Scheduler. It would have taken me weeks to find the cause but, 2 hours after installing ANTS Profiler, the problem was solved; it paid itself off on the first day I used it.

Graeme Elliott, Lead Architect, Spirit Software Solutions