AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="1.2.0-beta.439" />

 StringBuilderPool

public static class StringBuilderPool
Provides a pool of used / recycled resources.
public static bool IsPoolingDisabled { get; set; }

Gets or sets whether string builder pooling is disabled. When disabled, Obtain() will always return a new instance. Disabling will increase memory usage and GC pressure, but may improve performance in scenarios with high parallel processing.

public static int MaxCount { get; set; }

Gets or sets the maximum number of instances - at least 1.

public static int SizeLimit { get; set; }

Gets or sets the max. capacity per instance - at least 85000.

public static StringBuilder Obtain()

Either creates a fresh stringbuilder or gets a (cleaned) used one. If IsPoolingDisabled is set to true, a new instance is always returned."/>

public static string ToPool(this StringBuilder sb)

Returns the given stringbuilder to the pool and gets the current string content.