About the Author

Jason Schmidtlein

Jason is an experienced application developer and technical mentor with 8+ years of experience in IT. He possesses extensive experience crafting solutions in .NET and JavaScript, with particular emphasis in using JavaScript frameworks such as Angular and React in an enterprise environment. He has extensive hands-on experience in mentoring and collaborating in all phases of system development efforts, including requirements, design, development and post-production support.

.NET Memory Management with dotMemory

Jason Schmidtlein .NET, .NET Core, Articles, Development Technologies & Tools 2 Comments

Given the maturity of the .NET Framework and the automated nature of its memory management, many developers are guilty of glossing over (or even outright ignoring) whether their code is optimal in terms of CPU and memory usage. Personally, I have caught myself making sure my code is maintainable, testable, and extendable while forgetting to consider memory management in terms of nonfunctional aspects.

While the .NET runtime does a great job and memory corruption is extremely rare, we should still be concerned with memory management, particularly in large-scale .NET base applications.

This concern isn’t limited to on-premise applications. It’s easy to forget about memory usage with cloud computing. Azure Functions and AWS Lambda have billing structures based upon the average memory size per second of function execution. The direct correlation between memory usage and cost couldn’t be more transparent.

Fortunately, there are many great tools to help profile and analyze your memory footprint. JetBrains has a fantastic tool called dotMemory which makes it easy to profile processes, auto detect issues, perform deep analysis, and determine traffic. dotMemory can be installed as either a stand-alone tool or as a part of the ReSharper package integrated into Visual Studio.

In this post, we’ll show how to use dotMemory to generate a memory profile and analyze a memory leak in a .NET Core application.

Using Dapper Flexibly

Jason Schmidtlein .NET, Articles, Development Technologies & Tools 1 Comment

Dapper is a micro ORM (Object Relational Mapper) for .NET that is nearly as fast as using a raw ADO.NET data reader. It is a great alternative to Entity Framework, especially when performance is a top priority and you don’t need all the features of a “heavy” ORM.

In this post, I will provide an example of creating a generic CRUD repository that leverages the performance of Dapper while providing flexibility for a multitude of scenarios..