Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Html module to a separate assembly with all inlines #168

Closed
Tarmil opened this issue Jul 18, 2020 · 1 comment
Closed

Move Html module to a separate assembly with all inlines #168

Tarmil opened this issue Jul 18, 2020 · 1 comment
Labels
enhancement New feature or request released: v0.15

Comments

@Tarmil
Copy link
Member

Tarmil commented Jul 18, 2020

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.

@Tarmil Tarmil added the enhancement New feature or request label Jul 18, 2020
Tarmil added a commit that referenced this issue Aug 15, 2020
#168: Move Bolero.Html to a separate assembly with inlines
@Tarmil
Copy link
Member Author

Tarmil commented Aug 15, 2020

Closed by #169.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released: v0.15
Projects
None yet
Development

No branches or pull requests

1 participant