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
Given how size is an important factor in load time, I think there is reason to allow turning off certain parts of Yew if users don't use them via feature flags. Notable sections that can easily be partitioned away are Services and Agents. Without these, you can still create web-apps that display information and respond to user input. Framework users may want the choice to remove these features if they aren't using them.
Together, agents and services make up about 1.5kloc out of the 3.5kloc project (kloc is an okish proxy for binary size). While that seems large comparatively, remember that user-code and the expanded output from the html! macro accounts for far more code than the library does. Even if the 1.5kloc is reletively small, being able to eliminate it is valuable to those trying to get their app under a size budget.
Possibly in the future, services could be split into its own crate, and reexported from yew. Each service could be given a feature-flag, with a subset designated behind a core flag which would include the current services we have (this would be the subset reexported from yew).
This would allow that crate to accept less generally-useful services without causing code and feature bloat in the main yew repo.
I don't think this is super important to address in the near future, but I think its a discussion worth having.
The text was updated successfully, but these errors were encountered:
Description
**I'm submitting a feature request
Given how size is an important factor in load time, I think there is reason to allow turning off certain parts of Yew if users don't use them via feature flags. Notable sections that can easily be partitioned away are Services and Agents. Without these, you can still create web-apps that display information and respond to user input. Framework users may want the choice to remove these features if they aren't using them.
Together, agents and services make up about 1.5kloc out of the 3.5kloc project (kloc is an okish proxy for binary size). While that seems large comparatively, remember that user-code and the expanded output from the
html!
macro accounts for far more code than the library does. Even if the 1.5kloc is reletively small, being able to eliminate it is valuable to those trying to get their app under a size budget.Possibly in the future, services could be split into its own crate, and reexported from yew. Each service could be given a feature-flag, with a subset designated behind a
core
flag which would include the current services we have (this would be the subset reexported from yew).This would allow that crate to accept less generally-useful services without causing code and feature bloat in the main yew repo.
I don't think this is super important to address in the near future, but I think its a discussion worth having.
The text was updated successfully, but these errors were encountered: