Live data from Hacker News

Ember's Glimmer Engine

github.com

61–70 of 136 posts

Re: Ember's Glimmer Engine

#61
post #20

Interesting it's using Handlebars - I wonder how it compares to the diffing done in Ractive, which also uses a similar syntax ( http://www.ractivejs.org/ ).

To be clear, while we're using Handlebars syntax, the underlying runtime is not the standard handlebars.js, but a custom version for Ember.

Re: Ember's Glimmer Engine

#62

>building virtual DOM nodes for static areas of your markup that will never change for every change requires many more allocations and increases GC pressure. I'm not familiar with Ember, but why not just store the constant value in a variable to solve this problem? For example, in MithrilJS, you write templates in plain JavaScript, so I just stash large, static parts of the tree in variables and only rebuild vdom nod…

You appear to have been downvoted; while I don't know whether your potential solution is right or wrong your downvoters should have been polite enough to explain their reasoning.

I am confused what is being suggested.

> virtual DOM nodes for static areas of your markup

refers to React's virtual DOM implementation, not Ember's.

> I'm not familiar with Ember, but why not just store the constant value in a variable to solve this problem?

Ember is a complex framework. Suggesting a "solution" to challenges with an acknowledged lack of context, and adding "Simple", shows fairly poor attitude.

> I just stash large, static parts of the tree in variables and only rebuild vdom nodes for dynamic content

This sounds pretty much like what is already described in the PR.

Again, still confused, and still don't know what is being suggested.

Re: Ember's Glimmer Engine

#63
post #53

Earlier quoted context omitted.

It's also worth noting that we're getting to the point where fastest doesn't really matter. Both Ember and React will be fast enough. Performance shouldn't be a deciding factor.

One of the motivations for this change was that a real-world application was too slow. As the original presentation says, choosing a technology and then finding out that it's limiting you is really rough when it happens to you. Performance _does_ enable certain kinds of applications, and it does absolutely matter, even on the desktop.

Performance matters, but if Ember can have 50-60% of the speed of a performance-optimized React app without the associated cognitive overhead, I suspect many will see the trade-off as worth it.

Re: Ember's Glimmer Engine

#64

So how does this compare with Ionic/Angular on mobile? I recently made an app with Ionic, but the 1.0 migration caused gestures to no longer work. Can Glimmer run well on mobile?

I'll go ahead and plug myself here only because it's very relevant, but if you want to play with a full-stack for building mobile apps using virtual DOM, check out http://reapp.io

Re: Ember's Glimmer Engine

#65

Earlier quoted context omitted.

One of the motivations for this change was that a real-world application was too slow. As the original presentation says, choosing a technology and then finding out that it's limiting you is really rough when it happens to you. Performance _does_ enable certain kinds of applications, and it does absolutely matter, even on the desktop.

Performance matters, but if Ember can have 50-60% of the speed of a performance-optimized React app without the associated cognitive overhead, I suspect many will see the trade-off as worth it.

Agreed. And I suspect Ember can get closer than that, if not even outdo React in some cases.

Re: Ember's Glimmer Engine

#66

Earlier quoted context omitted.

One of the motivations for this change was that a real-world application was too slow. As the original presentation says, choosing a technology and then finding out that it's limiting you is really rough when it happens to you. Performance _does_ enable certain kinds of applications, and it does absolutely matter, even on the desktop.

Performance matters, but if Ember can have 50-60% of the speed of a performance-optimized React app without the associated cognitive overhead, I suspect many will see the trade-off as worth it.

Agreed, for sure. I wasn't trying to make a framework-specific statement, just disagreeing with the notion that performance doesn't matter at all. It may only be for certain kinds of applications, but having more options is always good.

Re: Ember's Glimmer Engine

#67

For the curious, here's a port of the Dbmonster demo to a simple Underscore template — the kind of base-level rendering strategy you might start with in a Backbone app. (And vintage 2009 technology.) http://jashkenas.github.io/dbmonster/ Edit: To head off grumbling at the pass — It would also be easy to do a slightly less-simple version that keeps the flickering impossible-to-read popups open (putting redundant toolt…

Unfortunately your example isn't a full reproduction as both the Ember/React examples reuse existing DOM which is important for selection state and the popover functionality.

Re: Ember's Glimmer Engine

#68

For the curious, here's a port of the Dbmonster demo to a simple Underscore template — the kind of base-level rendering strategy you might start with in a Backbone app. (And vintage 2009 technology.) http://jashkenas.github.io/dbmonster/ Edit: To head off grumbling at the pass — It would also be easy to do a slightly less-simple version that keeps the flickering impossible-to-read popups open (putting redundant toolt…

It's pretty cool to see that Ember is still in the same ballpark, especially when you realize that Ember does a ton of stuff that Backbone doesn't do for you :)

Re: Ember's Glimmer Engine

#69

I always have a problem with these kinds of frameworks. Every time I try to use one, and want to do something more in-depth for fancy than a lot of the functionality out-of-the-box, then I end up having to hunt down the way to extend X feature, and it often takes me more effort to do that then just writing in the root language would be. That is to say: The abstraction isn't as expressive as the root language, and whe…

That's what I like about the whole WebComponents movement. Whether you use Polymer or X-tags, it's just new DOM elements, and they function just like regular DOM elements, and you can drop down to vanilla JS easily without throwing the productivity benefits of a framework out the window.

Re: Ember's Glimmer Engine

#70
post #59
post #53

Earlier quoted context omitted.

It's also worth noting that we're getting to the point where fastest doesn't really matter. Both Ember and React will be fast enough. Performance shouldn't be a deciding factor.

I should have added the caveat that there will always be a handful of cases where you do need absolute top performance. However, I do think that for the vast majority of apps we'll end up at a point where performance isn't the deciding factor. It doesn't mean that we shouldn't keep improving performance, just that being the fastest doesn't matter so much if all the options are very fast.

it seems like if you're concerned with performance, react vs ember is not the conversation you're having.

your concern would be whether to use a framework at all

Post reply on HN