Upgrade to Ember 2.x?


(James Kiesel) #1

Apologies if this has been discussed somewhere before.

Discourse appears to be running Ember 1.12, somewhat of a :philosoraptor: given that the latest release is 2.9 beta. I totally get why; Ember 2.0 removed the concepts of views and controllers on the frontend, which Discourse relies on heavily (there’s ~50 each), so while it’s not as bad as an Angular 1.x -> 2.0 jump (we’re dealing with that mess at Loomio at the moment), at a glance it feels significant.

I’m not super knowledgeable on the matter, and the only thing I can say I’ve actually really missed so far is the {{each-in}} command (edit: now also the get template helper), but I have to imagine Ember 2.x has a smaller footprint (The docs say the major version jump was primarily removing junk) and runs much faster than 1.12. Are there plans for an upgrade path here?


(Gerhard Schlager) #2

Could be planned for 1.7


(Rafael dos Santos Silva) #3

It’s already planned for the next release or so. The glimmer compiler will help too, with compression for templates.


(Jeff Atwood) #4

Debatable. One reason we avoided upgrading was performance:

Doing some quick benchmarks at http://emberperf.eviltrout.com/ for Render Complex List, on a fast desktop machine in Chrome latest:

Ember 1.11 – 35 ms
Ember 1.12 – 43 ms (23% slower)
Ember 1.13.3 – 129 ms (!!)
Ember 1.13.9 – 80 ms
Ember 1.13.10 – 77 ms
Ember 2.0.2 – 78 ms
Ember 2.1.0 – 88 ms
Ember 2.2.0 – 62 ms
Ember 2.3.2 – 68 ms
Ember 2.4.4 – 66 ms
Ember 2.5.1 – 67 ms
Ember 2.6.x – 68 ms (55% slower than 1.12)
Ember 2.7.1 – 65 ms
Ember 2.8.x – 60 ms

(canary and beta fail to work for me at all.)

Of course you can multiply those numbers by 2x-10x depending on platform and device speed, where Android runs to the slower end.

We will be upgrading soon, as the performance loss is now mostly acceptable since we bypassed Ember for the virtual DOM approach on our most important pages in 1.5 (topic, header). The new near-binary serialization of templates will save bytes over the wire, and we’re hoping startup speed will improve.


(Jeff Atwood) #5

Good news on Ember 2.10!

Also more good news, @eviltrout has Ember 2.3 almost ready on our end, and we’ll either deploy Meta from a branch, or merge in Ember 2.3.

Ember 2.4 is a bigger milestone that may take a week or two more.

Then we can plow towards Ember 2.10.


(Joshua Rosenfeld) #6

Is 2.10 the goal for 1.7, or later?


(Sam Saffron) #7

we don’t know, probably 1.7, depends on how @eviltrout goes, too early to say.


(Robin Ward) #8

Yeah it’s really hard to predict how long some of the upgrades are going to take. Instead I’m just going to keep going through it and updating as much as I can.


(Jeff Atwood) #9