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
Formatted msbuild resource strings eventually get sent to loggers, which eventually write them to some stream. Most StreamWriters have overloads (or will have) for formatting. Therefore it is pointless to convert formatted resources into strings, if they're final resting place is some buffer anyway.
An interesting experiment would be to put the resource and its arguments into some struct, and then propagate that struct all the way into loggers, which then can format them directly into their streams / string builders / etc.
Building WebLargeCore with minimal verbosity creates 74mb of formatted resources:
And in a broader sense, we should look for cases where we strinbbuild or format strings just to then later put them in some buffer. Patterns that will help
switch to using ReadOnlyMemory instead of strings
future corefx work will allow us to retrieve the buffers from stringbuilders
use formatting overloads
The text was updated successfully, but these errors were encountered:
I believe most of this has been addressed by LazyFormattedBuildEventArgs. There was a bug related to minimal verbosity and improper usage of LazyFormattedBuildEventArgs - #5924
Formatted msbuild resource strings eventually get sent to loggers, which eventually write them to some stream. Most StreamWriters have overloads (or will have) for formatting. Therefore it is pointless to convert formatted resources into strings, if they're final resting place is some buffer anyway.
An interesting experiment would be to put the resource and its arguments into some struct, and then propagate that struct all the way into loggers, which then can format them directly into their streams / string builders / etc.
Building WebLargeCore with minimal verbosity creates 74mb of formatted resources:
And in a broader sense, we should look for cases where we strinbbuild or format strings just to then later put them in some buffer. Patterns that will help
The text was updated successfully, but these errors were encountered: