~/talk

Real-world examples on optimizing .NET performance

Talkat NDC Oslo 2023 · 2023-05-22..05-26· [dotnet]
slides:none on file

Realtime work on the RabbitMQ .NET client replaces MemoryStream+locks with sized frame objects, ArrayPool rentals, reduced allocations to 99 MB (from 7.14 GB) and drops allocated objects from ~4M to 1.8M, later down to ~30–40 MB. Techniques include stackalloc with fallback to ArrayPool, generics to avoid boxing, BinaryPrimitives for endian swaps (one instruction, ~95% faster), and channels as a single-writer buffer (used channels to eliminate per-frame locking). Benchmarks use BenchmarkDotNet and profilers like Visual Studio and JetBrains.

AI-written summary · about

  1. 0:00Intro
  2. 0:55Memory Allocations
  3. 1:21Garbage Collection
  4. 1:55Garbage Collector Phases
  5. 2:18Gen 2
  6. 3:59Reference vs. value types
  7. 5:10Performance Tips
  8. 5:42Example: Convert a string to UTF8 bytes
  9. 9:39Allocation Benchmark
  10. 15:42Boxing - Benchmark
  11. 16:16Binary Serialization and Endianness
  12. 17:37Old: RabbitMQ .NET Client reading int64
  13. 18:44ASM Diff
  14. 19:17Binary Serialization Benchmark
  15. 19:33System.Threading.Channels
  16. 24:36Applying these optimizations in the real world
  17. 25:31AMQP Frame
  18. 27:13Problem 1
  19. 29:22Solving the problems
  20. 30:53Validating the changes
  21. 34:30JetBrains dotTrace
  22. 38:24PowerUp
  23. 39:04Questions?
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.