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

2.2.0: massive bundle size increase #356

Open
st-h opened this issue Feb 10, 2020 · 7 comments
Open

2.2.0: massive bundle size increase #356

st-h opened this issue Feb 10, 2020 · 7 comments

Comments

@st-h
Copy link
Contributor

st-h commented Feb 10, 2020

Describe the bug
The bundle size for 2.2.0-beta almost doubles compared to 2.1.3.

ember-cli-bundle-analyzer lists the following sizes added to vendor.js
5.4kb version 2.1.3
10.3kb version 2.2.0-beta

I think this is due to bundling the modifier version together with the non modifier version, even though both code paths are pretty much independent from each other.

For the 2.2.0 release it would be great if either both versions could be released separately, or the non-modifier version would be dropped in favour of the modifier version (which would also mean old ember versions would no longer be able to use the latest version of ember-sortable).

Keeping the current way of packaging would lead to unnecessary bloat of consuming ember apps, as always both versions of this addon will be included and will have to be parsed and compiled by the browser, which easily leads to performance issues especially on mobile.

@chriskrycho
Copy link
Contributor

Note that this—

the non-modifier version would be dropped in favour of the modifier version (which would also mean old ember versions would no longer be able to use the latest version of ember-sortable)

—would definitely be a breaking change. That would require a 3.0. (Which is a good idea, just need to be clear about it!)

@ygongdev
Copy link
Member

This is expected as a tradeoff for supporting modifier. The goal is to keep modifier in beta until it's battled tested enough before we release 3.0.0 supporting only modifier.

2.2.0-beta.* is meant for battle testing both non-modifier and modifier.
3.0.0-beta will be for battle testing modifier-only.

I'm open to any better ideas.

@st-h
Copy link
Contributor Author

st-h commented Feb 11, 2020

@ygongdev Thanks a lot for the clarification. Sometimes there are good reasons one should not try to add beta releases to production apps. 😬
Is the non modifier version going to be dropped, or will that continue as 2.x when the modifier 3.x release is out?
Now that both versions don't share any code, we could also create a dedicated modifier repo/addon, which might make it easier to still maintain any non-modifier releases.

@cah-brian-gantzler
Copy link
Contributor

There was some discussion originally about making the modifier version a new addon and not a change to this one. It was eventually arrived at not a new addon. It was discussed in the original PR. Maybe reading it might remind us why we didnt do that in the first place, or show us why not doing it was a bad decision :)

#344 (comment)

@ygongdev
Copy link
Member

ygongdev commented Feb 11, 2020

The direction I'm leaning toward is stop development on non-modifier, aka no more 2.x releases and focus on modifier, aka 3.x releases.

Here are some reasons why 2.x still exists and why there's non-modifier and modifier currently bundled together:

  1. Not everyone has adopted 3.8 or using modifiers.
  2. Not everyone is using modifiers.
  3. Feature parity with non-modifier

The release of 3.x is also dependent on when we are able to flesh out all the problems we're discovering with the modifiers right now :)
Unfortunately, I'm quite new to modifiers, so I won't have much to contribute until I start digging deeper.

@BryanCrotaz
Copy link

I'd vote for moving modifier to a 3.0-alpha
Also think about a codemod to upgrade apps from 2.x.x to 3.0.0

@runspired
Copy link

I wrote a codemod for 1.x => 3.x, 2.x seems a lot harder to codemod but still doable. Happy to share for any 1.x-ers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants