r/programming • • Jun 01 '15

Is ReactJS faster than AngularJS ?

http://blog.500tech.com/is-reactjs-fast/
0 Upvotes

8 comments sorted by

4

u/[deleted] Jun 01 '15

missing the point i suspect..

2

u/dwighthouse Jun 02 '15

Maybe. There is no upper bound to how badly you can write ReactJS or AngularJS code. For that matter, there's no limit to how badly you can write C, C++, and assembly language code.

What matters is: Is it fast enough for the user? Is it fast enough for the developer to develop in long term both for initial development and for long term maintenance.

As a user of both, I can confidently say that, without any manual optimizations, Angular performs pretty poorly on large lists, which I frequently must work with. React is faster out of the box. The ease with which I can do custom optimizations on React is also easier and therefore more likely to happen.

When dealing with JS frameworks, unless you're doing some next generation DOM and JS code rewriting to compile away the abstractions into the lowest possible level DOM manipulation commands per data update (not talking about glimmer here), you will always be slower than the two alternatives.

  • No framework - manually updating the DOM with the minimal set of changes per data change. This is unscaleable, which is why we started using frameworks in the first place.

  • Scrapping the DOM entirely and doing all rendering in the hardware accelerated canvas using a built from scratch DOM like structure that has all the inherent inefficiencies removed. This is usually overkill, but who knows? Maybe this is what the next framework will be.

1

u/crixusin Jun 02 '15

Scrapping the DOM entirely and doing all rendering in the hardware accelerated canvas using a built from scratch DOM like >structure that has all the inherent inefficiencies removed. This is usually overkill, but who knows? Maybe this is what the next framework will be.

It is: http://engineering.flipboard.com/2015/02/mobile-web/

I was very impressed with this tech demo. It FEELS native, but the hoops to jump through and do all this seem counter intuitive since you have to keep all elements positions tracked, and then handle any events inside the canvas to look through this virtual dom.

2

u/go_fuck_ye_self Jun 01 '15

it doesn't matter which is faster. React is more of a philosophy and it's just plain better.

1

u/crixusin Jun 02 '15

Why would you say so? I haven't used react, but I like the angular model, and am super excited for Angular2. Should I just move the react and expect a better experience?

-2

u/go_fuck_ye_self Jun 03 '15

Many core angular people are not excited about it. The new hotness is jumping off of Angular to anything else. If it was so good they wouldn't be rewriting everything from scratch. I've used both, I simply don't like the shit Angular makes me jump through. I switched to React, and everything just flows I spend less time fighting with shit, it just works.

1

u/crixusin Jun 03 '15

Wouldn't you say that a pure typescript implementation is very powerful though? I might switch to react though from what I'm hearing from others. It's true that it's slower out of the box, for no other reason other than poor documentation and obscurity of the track command.

1

u/[deleted] Jun 01 '15

And this is how research should be done. Thanks for the write-up.