Category Archives: Uncategorized

Announcing: Microsoft.IO.RecyclableMemoryStream 1.3.0

It’s a long time coming, but I’ve finally released the next version of Microsoft.IO.RecyclableMemoryStream!

Links

What’s New

Bug Fixes

  • Removed a buggy and unnecessary boundary check in Write methods. (927e173, benmwatson)

Performance

  • Removed LINQ iteration in some properties (ffe469c, ndrwrbgs)
  • Overloads of Read, SafeRead, and Write that accept Span<byte> arguments (.NET Core and .NET Standard targets only) (86fc159, brantburnett)

Functionality

  • New buffer allocation strategy: exponential. Instead of linearly increasing large buffer sizes by a fixed multiple (say, 1MB), you can choose to have it increase exponentially in size, starting with smaller large buffers. This will allow you more efficient use of space, especially in smaller heap scenarios where you don’t have gobs of memory to keep in a pool. We use this in Bing in some data centers that are more resource constrained than others. (4755383, magicpanda0618)
  • New targets for .NET Framework 4.6, .NET Standard 2.1 (4e97a7c, brantburnett,
    927e173, benmwatson)
  • Overload for TryGetBuffer, introduced in .NET Framework 4.6.
    (927e173, benmwatson)
  • Allow the Stream’s GUID to be set explicitly (c21b25b, mosdav)

Meta

  • Removed CBT build support files. Using dotnet.exe to build now.
  • Added public key for delayed signing during build
  • Consolidate and updated all NuGet package settings in the .csproj file.
  • Added setting for generating a NuGet package for symbols (.snupkg)

Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order:

Sample Chapter of Writing High-Performance .NET Code, 2nd Edition

Head on over to http://www.writinghighperf.net to read a sample chapter of Writing High-Performance .NET Code, 2nd Edition. The sample PDF also includes some of the front and back material to give you a taste for the rest of the book.


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order:

Writing High-Performance .NET Code on the No Dogma podcast

I was recently interviewed by the wonderful Bryan Hogan for his No Dogma podcast. Check out the episode here. If you want to subscribe, which you should, podcast feed is here. You can follow Bryan or myself on Twitter.

Check it out! We had a great discussion about performance, Bing, Azure, and more.


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order:

Blog moving hosts this weekend

I looked at my site’s settings in Google’s webmaster center and it told me that my site was in the top 5% slowest sites on the Internet. Wow. That really sucks. I’m sorry, dear reader. In any case, this was the final straw, after a string of outages and other general unhappiness. So I’m moving on…

I hope to make this change with no downtime, but who knows who well that will work.


Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order: