Given that projects could have hundreds to thousands of these violations, could Visual Studio provide a refactoring tool to automate this optimization? This would be extremely helpful for developers working on projects that utilize resource files extensively.
This issue has been moved from a ticket on Developer Community.
In code analysis, it states, "Cache and use a 'CompositeFormat' instance as the argument to this formatting operation, rather than passing in the original format string. This reduces the cost of the formatting operation." Based on my benchmark analysis, this approach indeed speeds up formatting. For more details, see: https://dotnettips.wordpress.com/2024/06/23/string-performance-improving-string-formatting-performance-by-a-factor-of-1-5-or-more/
Given that projects could have hundreds to thousands of these violations, could Visual Studio provide a refactoring tool to automate this optimization? This would be extremely helpful for developers working on projects that utilize resource files extensively.
Original Comments
Feedback Bot on 6/26/2024, 10:17 PM:
(private comment, text removed)