You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BlobBuilder Allocation Strategy Plan — System.Reflection.Metadata pooling for Roslyn VBCSCompiler
BlobBuilder Allocation Strategy Plan
Problem Statement
Roslyn's VBCSCompiler process suffers from significant byte[] allocations driven by System.Reflection.Metadata APIs, primarily through BlobBuilder. The goal is to enable a pooling strategy where Roslyn pre-allocates ~4MB of byte[] and PE file writing completes with zero (or near-zero) additional allocations.
Suggestion for how to better implement build-server shutdown
Shutting down our build servers
Motivation
The .NET build contains a number of long lived server processes: msbuild nodes, razor and roslyn. A requirement of the .NET SDK is for customers to be able to reliably shut down all servers created during any build. This is important for shutting down a build operation and ensuring that no files remain locked on disk.
This challenging because there is no easy answer to discovering which processes are build servers:
These are primarily .NET SDK process which means they all share the same process name: dotnet
These processes do not have a strict parent / child relationship with build commands. Several, like roslyn, live past the msbuild nodes that created them.
Read a file line by line without allocating too muuch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\jaredpar\code\PublicBugs\CscAnal>REM passing Newtonsoft.Json.dll 13.0.0.0 works fine and results in the expected:
C:\Users\jaredpar\code\PublicBugs\CscAnal>REM arning CS8785: Generator 'Generator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentNullException' with message 'Value cannot be null.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters