The community discussed plans to upgrade Discourse from Ember 1.12 to the 2.x series. gdpelican noted the significant effort required to remove reliance on views and controllers but hoped for performance gains and a smaller footprint. gerhard and Falco confirmed the upgrade was already planned for the upcoming 1.7 release, with benefits expected from the Glimmer compiler. However, codinghorror highlighted that performance benchmarks showed Ember 2.x was initially slower than 1.12, explaining why the upgrade was delayed until virtual DOM optimizations were implemented. He later updated the thread with positive news that Ember 2.10 beta achieved a 50% performance improvement over 2.8, dropping render times to 30ms codinghorror. While jomaxro asked if 2.10 was the specific goal for 1.7, sam indicated the target depends on progress. eviltrout clarified that timelines are difficult to predict due to the complexity of the migration, stating he is proceeding incrementally with updates.
Apologies if this has been discussed somewhere before.
Discourse appears to be running Ember 1.12, somewhat of a 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?
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.
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.