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

Поделиться
HTML-код
  • Опубликовано: 16 июн 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/
  • НаукаНаука

Комментарии • 16

  • @coltyngregoryify
    @coltyngregoryify 11 месяцев назад +17

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

  • @desertfish74
    @desertfish74 11 месяцев назад +24

    why is there so much crowd noise in the background?

  • @martink.7497
    @martink.7497 11 месяцев назад +5

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

  • @PaulSebastianM
    @PaulSebastianM 11 месяцев назад +3

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

  • @wojciechmikoajewicz1983
    @wojciechmikoajewicz1983 11 месяцев назад +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 11 месяцев назад +1

      Thanks for the correction. I had overlooked this :)

  • @EternalVids
    @EternalVids 11 месяцев назад +5

    Was this filmed in the middle of a busy cafeteria?

  • @BryonLape
    @BryonLape 9 месяцев назад +4

    Who does the audio for tech conferences?

  • @BrendonParker
    @BrendonParker 2 месяца назад +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 11 месяцев назад +1

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

    • @gdargdar91
      @gdargdar91 10 месяцев назад

      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 10 месяцев назад

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

  • @styleisaweapon
    @styleisaweapon 11 месяцев назад +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(..) )

  • @Anllazsn
    @Anllazsn 6 месяцев назад +1

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

  • @urvhalt
    @urvhalt 11 месяцев назад

    Performance and .NET in the same sentence...

    • @MarcusGarveysGhost
      @MarcusGarveysGhost 4 месяца назад +7

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