Hacker News new | ask | show | jobs
by hrktb 3739 days ago
> My (very rough) understanding is that Ember tends to have a lot of issues running on V8

From an outsider's perspective, it would be fair to question if the problem is on Ember's side or V8's side.

Look around the web, From the reports Ember is performing well enough on Safari and firefox, so puting the blame on V8 seems sensitive to me.

1 comments

You have a good point. Ember triggers a weakness in V8's optimizations causing repeated optimizing and de-optimizing of core Ember functions, which takes time and generates lots of garbage, and V8 should fix that.

My understanding is the V8 team _is_ attempting to fix Ember (and Ember-style code) performance on multiple fronts, things like adding an interpreter, tuning how opt and de-opt are triggered, maybe adding dev tools that make it clear when script is spending time de-opting. Probably the most important thing would be to get more realistic workloads into benchmarks.

Ember does appear to be a pathological case though. Every other framework of similar size has managed to attain decent performance on Chrome.

One take-away here is that JS developers should not assume that all code is fast in all VMs. Optimizations are often (very educated) guesswork, and developed and tested against some corpus of benchmarks. If you use a pattern that isn't common in the benchmarks, you might trigger an unexpected problem. Framework developers should measure performance across browsers early, before baking in any hard to change design decisions.