C# Digest #399: Optimizing CPU-bound and memory-bound .NET applications: 11 best practices

And more news, tutorials and articles about C# and .NET in this week's issue.

#399 — January 24, 2022 View in browser

C# Digest

Spread the word, build the community, share the knowledge – invite your friends.

sponsor

Powerful DevOps automation

Octopus Deploy easily automates your deployments and operations runbooks from a single place, helping you ship code quickly and reliably. Class-leading support for .NET applications on Windows Servers and Azure.

this week's favorite

Optimizing CPU-bound and memory-bound .NET applications: 11 best practices

Everything has its limit, right? A car can drive only so fast, a process can use only so much memory, and a programmer can drink only so much coffee. Our productivity is limited by our resources, but we have the ability to make better or worse use of them. The goal should be to use each of our resources as close to its limit as possible. We want to use every bit of our CPU and memory or else we're over-paying for expensive machines. But if we use too much of those resources, we run the risk of causing performance problems, unavailable service issues, and downright crashes. It's a tricky game to play and that's what we're going to talk about today.

Favor real dependencies for unit testing

Which dependencies should be present in your code base? This article suggests an answer to that question.

Deep introduction to .NET MAUI handlers architecture

In my last article, I did a deep introduction to .Net MAUI. For my first article of the year, we will have an introduction to .NET MAUI handlers. If you are a Xamarin dev, you should know about the “Renderers” architecture. Well, handlers are what replaced renderers when Xamarin Forms evolved to .NET MAUI. But there is so much more about handlers, and today we are here to explore that.

State of the Windows Forms Designer for .NET Applications

After reading this blog post you will be familiar with the underlying problems the new WinForms designer is meant to solve and have a high-level understanding of the primary components in this new approach. Enjoy this look into the designer architecture and stay tuned for future blogs!

Get C# metadata from a call site

C# is a statically typed language, and one of the greatest derived strengths is our ability to ask questions around our code. Whether you love it or hate it, reflection is a critical part of the .NET stack, and when you program long enough, you’re bound to run into it. What if I told you there are other ways to get information about your executing application? In this post, we’ll take a look at the Caller* family of attributes, which will allow you to get information like file path, line number, member name, and argument expression. You can find all of these methods in the System.Runtime.CompilerServices namespace.

courses

Free Course: Try IAC with Justin Mitchel

Learn the fundamentals of leading Infrastructure as Code (IaC) tools by deploying Docker-based Python web applications. Over 13 hours of free video content covering Terraform, Ansible, Salt (SaltStack), Puppet Bolt, and Chef. Available Now.

newsletters


© 2022 Bonobo Press
Would you like to advertise or post a job with us? Check out our latest media kit.
If you no longer wish to receive these emails, click to unsubscribe.

Older messages

C# Digest #398: LINQ enhancements in Entity Framework Core 6

Sunday, January 16, 2022

And more news, tutorials and articles about C# and .NET in this week's issue. #398 — January 17, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge – invite

C# Digest #397: Refactoring with C# 10

Sunday, January 9, 2022

And more news, tutorials and articles about C# and .NET in this week's issue. #397 — January 10, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge – invite

C# Digest #396: Looking back at C#

Sunday, January 2, 2022

And more news, tutorials and articles about C# and .NET in this week's issue. #396 — January 03, 2022 View in browser C# Digest Spread the word, build the community, share the knowledge – invite

C# Digest #395: Microsoft .NET history

Sunday, December 26, 2021

And more news, tutorials and articles about C# and .NET in this week's issue. #395 — December 27, 2021 View in browser C# Digest Spread the word, build the community, share the knowledge – invite

C# Digest #393: Don't do that, do this: the .NET 6 edition

Sunday, December 12, 2021

And more news, tutorials and articles about C# and .NET in this week's issue. #393 — December 13, 2021 View in browser C# Digest Spread the word, build the community, share the knowledge – invite

You Might Also Like

Import AI 399: 1,000 samples to make a reasoning model; DeepSeek proliferation; Apple's self-driving car simulator

Friday, February 14, 2025

What came before the golem? ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Defining Your Paranoia Level: Navigating Change Without the Overkill

Friday, February 14, 2025

We've all been there: trying to learn something new, only to find our old habits holding us back. We discussed today how our gut feelings about solving problems can sometimes be our own worst enemy

5 ways AI can help with taxes 🪄

Friday, February 14, 2025

Remotely control an iPhone; 💸 50+ early Presidents' Day deals -- ZDNET ZDNET Tech Today - US February 10, 2025 5 ways AI can help you with your taxes (and what not to use it for) 5 ways AI can help

Recurring Automations + Secret Updates

Friday, February 14, 2025

Smarter automations, better templates, and hidden updates to explore 👀 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

The First Provable AI-Proof Game: Introducing Butterfly Wings 4

Friday, February 14, 2025

Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? undefined The Market Today #01 Instagram (Meta) 714.52 -0.32%

GCP Newsletter #437

Friday, February 14, 2025

Welcome to issue #437 February 10th, 2025 News BigQuery Cloud Marketplace Official Blog Partners BigQuery datasets now available on Google Cloud Marketplace - Google Cloud Marketplace now offers

Charted | The 1%'s Share of U.S. Wealth Over Time (1989-2024) 💰

Friday, February 14, 2025

Discover how the share of US wealth held by the top 1% has evolved from 1989 to 2024 in this infographic. View Online | Subscribe | Download Our App Download our app to see thousands of new charts from

The Great Social Media Diaspora & Tapestry is here

Friday, February 14, 2025

Apple introduces new app called 'Apple Invites', The Iconfactory launches Tapestry, beyond the traditional portfolio, and more in this week's issue of Creativerly. Creativerly The Great

Daily Coding Problem: Problem #1689 [Medium]

Friday, February 14, 2025

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. Given a linked list, sort it in O(n log n) time and constant space. For example,

📧 Stop Conflating CQRS and MediatR

Friday, February 14, 2025

​ Stop Conflating CQRS and MediatR Read on: m​y website / Read time: 4 minutes The .NET Weekly is brought to you by: Step right up to the Generative AI Use Cases Repository! See how MongoDB powers your