ember-sortable
ember-sortable copied to clipboard
2.2.0: massive bundle size increase
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.
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!)
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.
@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.
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 :)
https://github.com/adopted-ember-addons/ember-sortable/pull/344#issuecomment-566271653
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:
- Not everyone has adopted
3.8or usingmodifiers. - Not everyone is using
modifiers. - 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.
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
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