DEV Community

Pablo Miranda
Pablo Miranda

Posted on

Performance Awareness

When considering performance, what you have to care about is having a metric -usually- elapsed time from which you can notice change and identify time consuming data operations. This is something you want to do early in development even on prototypes as it will usually challenge your design overtime.

This will go from design to maintenance on the product cycle because you can always lose performance, so the key here is to measure again and again, without loosing focus on correctly interpreting the results which is as important as measuring in the first place.

A hard thing to grasp here is that performance has layers of complexity, programs are complex and run on even more complex hardware, on top of it you find abstractions (memory, caches, OS, runtimes, garbage collectors, etc). This can be overwhelming with so many thing to be measured plus tools that come along with it.

What to measure and what relationship among measurements is important, setting goals through metrics.

.NET Framework

The focus here will be .NET framework, so much of it just works, with .NET you have managed applications which are put on a safe operating environment between the application and the operating system, there is overhead by not having direct access to Windows APIs nor direct access to the processor.
Having this safe net on your program is good but not free, enables you rapid development which most times derives on poor code resulting on slow bloated applications.

Is always easier to just blame the framework for all problems, performant code does not come easy, that's for sure.

Big changes on your code base are always easier to introduce in the form of a design decision due to experimentation rather than trying to change your application when is already big and complex where dependencies have to be take into account.

FYI

I will try to keep things balanced on how I will approach .NET framework details and IL on the other side, so our focus will be on how to benefit from the .NET framework but also recognize and know when you have to sacrifice so call benefits of .NET as well.

What you get out of your application, making the most of it comes from deep understanding of your own code, the framework, the OS and most important the hardware itself.

Top comments (0)