Optimizing C# collections with predictive sizing

Dynamic collections, such as the dynamic array (also known as a List in C#), are without a doubt one of the most common data structure, and not only in C# but in computer science in general. The dotnet base class library exposes plenty of dynamic collections to fulfil a wide number of usecases: (System.Collections.)List<T>, Dictionary<K, V>, HashSet<T>, Queue<T>, Stack<T>, and more. But they all share one thing in common: they are based on dynamic reallocation of backing arrays, which can lead to suboptimal performance and excessive memory allocation....

March 14, 2025 · 14 min

A solution to gitlab package registry 429's errors

The GitLab CI ecosystem is full of features and integrations that make it a powerful tool for building, testing, and deploying your applications. It comes with an integrated package registry to share and manage your packages. However, the GitLab SaaS API (gitlab.com) comes with rate-limits which can be a problem for scaling CI/CD pipelines, and quite frustrating when you hit them. In this article, I will share a solution I find odd yet very effective: implementing a caching proxy in front of the NuGet GitLab package registry....

February 7, 2025 · 9 min

Challenges & memory considerations for in-memory caching

In this article I’d like to share my journey learning about caching, and my research on how to make it more efficient. This article is the first in a serie of articles about caching, and here we’ll start by discussing the challenges and memory considerations when doing in-memory caching. This was done as part of my day job as a Staff backend engineer at Equativ, a leading provider of digital advertising solutions, offering a range of products and services to help businesses reach their target audiences and achieve their marketing goals....

February 1, 2025 · 15 min

My experience on implementing tracing at scale

Tracing is a telemetry concept that gives us the big picture of what happens when a request is made on a distributed system. Several solutions exist to add “automated” tracing. Abstracting and hiding things away from you does indeed make it easier to use, but as soon as you need to adapt something to your specific needs, it will start to be a pain. If you have the human resources and the will to have a proper tracing, my advice is to understand the concepts and implement parts of it yourself....

March 2, 2024 · 11 min