Live data from Hacker News

Ember's Glimmer Engine

github.com

11–20 of 136 posts

Re: Ember's Glimmer Engine

#11
post #8

Can we have a side-by-side comparison of the same demo using normal Ember?

They showed that side by side. Imagine the page reloading every 2 seconds instead of at the rate it is now. The improvement is incredible to see.

Re: Ember's Glimmer Engine

#13
post #9
post #8

Can we have a side-by-side comparison of the same demo using normal Ember?

It's slow. Real slow. The original demo really stressed Ember's pathological cases, so it was a great thing to keep in mind as we developed Glimmer.

I saw the original at a Meetup a while back and it was crash-the-browser slow. This is far improved.

Re: Ember's Glimmer Engine

#14

Here is a pretty neat demo with tons of live updates from a firebase cluster: https://dbmonster.firebaseapp.com/

Demo of embers original performance with dbmon along with angular and react https://www.youtube.com/watch?v=z5e7kWSHWTg

Are there demos and/or source code for the Angular and React implementations used in that presentation? I'd like to compare React to this new Ember implementation, because the latter, while better than the Ember demo in that presentation, is still noticeably sluggish on my machine.

Re: Ember's Glimmer Engine

#16
Quote from wycats during the talk:

   > Because our template language is declarative, we can do this at compile time.
"This" being determining which portions of the DOM will never change, and so only needing to analyze the portions that might.

Re: Ember's Glimmer Engine

#17
post #14

Earlier quoted context omitted.

Demo of embers original performance with dbmon along with angular and react https://www.youtube.com/watch?v=z5e7kWSHWTg

Are there demos and/or source code for the Angular and React implementations used in that presentation? I'd like to compare React to this new Ember implementation, because the latter, while better than the Ember demo in that presentation, is still noticeably sluggish on my machine.

https://github.com/ryanflorence/reactconf-2015-HYPE/tree/mas...

Re: Ember's Glimmer Engine

#19
post #15

Never used ember but that deserves a pretty complete write up about what was done and how. Nice work.

Here's a TL;DR:

A handlebars template might look like this:

    
      {{#if enabled}}
        

I'm enabled!

{{#end}}
The usual DOM-diffing algorithm compares every single thing: "has this div changed? Has the class changed? Has the

changed?"

This uses the knowledge of Handlebars to make the diffing algorithm smarter: you don't need to check if the or its class has changed, it never will. You don't need to check if the

's contents have changed, it never will. This means less to diff, which means more speed.

This is the advantage of using a declarative syntax for templating: this analysis can be done entirely at compile time.

Post reply on HN