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
Blazor's tree shaking only shrinks System.* and Microsoft.* assemblies; other assemblies, including Bolero.*, are either served whole, or omitted if they're not called at all. As a consequence, all the functions for HTML elements, attributes, event handlers and binders are served, even though any given project only uses a fraction of them.
We could improve this by moving these functions to a separate assembly and making them all inlines. Since they're all inline, no actual code from the new assembly is called, so this assembly is omitted entirely from the output. Based on a quick experiment, the resulting download size for a small application is reduced by about 40kB (uncompressed).
This would also make alternative syntax ideas such as #167 more appealing, as their download size wouldn't be burdened by the default Html module at all.
The text was updated successfully, but these errors were encountered:
Blazor's tree shaking only shrinks System.* and Microsoft.* assemblies; other assemblies, including Bolero.*, are either served whole, or omitted if they're not called at all. As a consequence, all the functions for HTML elements, attributes, event handlers and binders are served, even though any given project only uses a fraction of them.
We could improve this by moving these functions to a separate assembly and making them all
inline
s. Since they're all inline, no actual code from the new assembly is called, so this assembly is omitted entirely from the output. Based on a quick experiment, the resulting download size for a small application is reduced by about 40kB (uncompressed).This would also make alternative syntax ideas such as #167 more appealing, as their download size wouldn't be burdened by the default Html module at all.
The text was updated successfully, but these errors were encountered: