Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
The source generator currently uses regular string literals for HTML content.
For example,
__builder.AddMarkupContent(4, "<h1>Hello, world!</h1>\n\nWelcome to your new app!\n\n");
String literals are stored in the assembly in #US
metadata heap using UTF16 encoding. The heap size is limited and larger apps run out of the space.
See #20224.
Describe the solution you'd like
Using UTF8 literals would address this issue. UTF8 literals are stored directly in the PE image at specified RVA. The metadata heap size limitations thus do not apply.
Besides, it would likely be faster and more memory efficient to render the pages since UTF16 to UTF8 encoding might be avoided.
Additional context
No response