Real-world examples on optimizing .NET performance - Stefán Jökull Sigurðarson - NDC Oslo 2023

Sdílet
Vložit
  • čas přidán 25. 06. 2024
  • In this session I will show you real-world examples of code and techniques used to improve the performance of the RabbitMQ .NET Client, a .NuGet package with over forty-nine million downloads on NuGet. You will learn about memory allocations and their impact on the garbage collector and performance optimization techniques. You will get to know .NET language features like ref structs and ref parameters, code inlining, .NET constructs like Span T, Memory T, ArrayPool and even some unsafe code. There will be benchmarks and real code that you can apply to your own solutions and, who knows, you might even catch the occasional glimpse of some assembly code!
    Check out our new channel:
    NDC Clips:
    ‪@ndcclips‬
    Check out more of our featured speakers and talks at
    ndcconferences.com/
    ndcoslo.com/
  • Věda a technologie

Komentáře • 16

  • @coltyngregoryify
    @coltyngregoryify Před 11 měsíci +17

    Maybe the best NDC talk AND THEY FILMED IT IN A HALLWAY

  • @martink.7497
    @martink.7497 Před 11 měsíci +5

    Honestly, never heard of Channels and saw so many optimizations. Well done 👍

  • @desertfish74
    @desertfish74 Před 11 měsíci +24

    why is there so much crowd noise in the background?

  • @EternalVids
    @EternalVids Před 11 měsíci +5

    Was this filmed in the middle of a busy cafeteria?

  • @PaulSebastianM
    @PaulSebastianM Před 11 měsíci +3

    00:00 Intro
    01:20 Garbage collectio
    03:58 Reference vs. Value types
    05:16 Performance tips

  • @wojciechmikoajewicz1983
    @wojciechmikoajewicz1983 Před 11 měsíci +4

    ArrayPool doesn't have a reference to the array after rent, so not returning array to the pool mitigates the point of using ArrayPools but isn't dangerous - do not lead to memory leaks. You don't need to be orthodox and write some finalizers to be extremally sure that array will return to the pool on some edge cases (like exceptions).

    • @Stebet
      @Stebet Před 11 měsíci +1

      Thanks for the correction. I had overlooked this :)

  • @BryonLape
    @BryonLape Před 9 měsíci +4

    Who does the audio for tech conferences?

  • @BrendonParker
    @BrendonParker Před 2 měsíci +1

    "But if it was to be run on different architectures... (fluke boom in audience) ... it would fail" made me lol 28:02

  • @weriohjiuhuih
    @weriohjiuhuih Před 11 měsíci +1

    Isn't Channels same as the "new" Pipe API?

    • @gdargdar91
      @gdargdar91 Před 10 měsíci

      Channels are made for asynchronous producer-consumer scenarios and they are generic, for any type T. The new pipe API works with raw bytes and provides automatic memory buffer management via memory pooling.

    • @weriohjiuhuih
      @weriohjiuhuih Před 10 měsíci

      ​@@gdargdar91
      But also Pipes have async producer/consumer pattern, there is two types of pipe, `IPipeReader` and `IPipeWriter`

  • @Anllazsn
    @Anllazsn Před 6 měsíci +1

    Eye opening conference, too bad the noise and claps distract it.

  • @styleisaweapon
    @styleisaweapon Před 11 měsíci +6

    Its about time the working of the garbage collector is considered important instead of treated like a black box. .NET game devs take note, the GC isnt optimized for your use case, so you have to take control and do regular collection manually (GC.Collect(..) )

  • @urvhalt
    @urvhalt Před 11 měsíci

    Performance and .NET in the same sentence...

    • @MarcusGarveysGhost
      @MarcusGarveysGhost Před 5 měsíci +7

      I see you must have been living in a cave since the last couple .Net Core release iterations