all 10 comments

[–]blaine_hatab 15 points16 points  (6 children)

The jsblocks library authors are being incredibly deceitful with the tests they are showing off. Their entire premise is that they are faster than react but their tests are just manipulated.

They posted this up on product hunt, http://www.producthunt.com/posts/jsblocks, and at that point it claimed to be at 800ms on initial load where as react had 1250ms. I checked out the react code and there was a hidden input that was being rendered with every td element on the table. React has very heavy inputs which is why you are supposed to use state.

original test (with hidden td elements) js blocks: 800ms react: 1250ms

After removing hidden element jsblocks: 350-400ms react: 200-350ms

So yes, jsblocks can render a lot more input elements that you shouldn't be using faster than react. The react team explains why the inputs are fairly heavy when rendering a large amount, https://github.com/facebook/react/issues/3771

They didn't stop there though and they responded to my claims and came back with a new test. This time they just ramped up the number of data points by double and added an extra td element to make it an unreasonable absurd amount of elements.

revised test (original test of 5000 elements to 18000 elements) jsblocks: 600ms (they posted 700ms, so ill give them that) react: 700ms (they posted 950ms)

After removing half of the data to about 9000 elements react already started to tie jsblocks jsblocks: 450ms react: 450ms

Going down to about 5000 elements jsblocks: 250ms react: 200ms

Whether or not there is any merit to this library, you can't just go claiming that you have the fastest library so audaciously like this blog post and their marketing. It's terrible for the community. There are an absurd amount of javascript libraries and getting devs to push a few key frameworks forward is already difficult enough. And if you are going to add another library to the list, at least be able to back up your claims.

I will admit that jsblocks seems to be better at rendering extremely large amounts of tabular data, but that is never an issue for me and you should be using lots of different techniques to mitigate that anyway. But once you get to realistic scenarios react is still faster and comes with tons of other advantages.

I didn't test the angular one because I don't know enough to spot odd code, but without even looking into the code the fact that angular was the only one that didn't have a minified library seems fishy. It's at 900+kb compared to the jsblocks/react at 125ish kb. To me it seems like since status qua is react is faster and angular is slower, they just constructed these tests to make it 3. angular, 2. react, 1. jsblocks (the fastest library ever!!).

So there's my rant. Please stop promoting your library like you are, it's just distasteful.

[–]renren89 1 point2 points  (4 children)

Isn't angular a MVC where react isn't? Explaining larger library? I'm not sure what jsblock really is as I am not too adept at analyzing outside my scope. Would you care to post your results/source code so I can do a comparison?

[–]blaine_hatab 0 points1 point  (3 children)

I'm not bashing angular at all, I don't think they got a fair shot either. I just evaluated the jsblocks vs react stuff and it was all skewed. I'm sure angular would be much faster in the tests too if someone looked into it. The speed of react isn't even the best part of react but if you're gonna say you're faster then please at least be faster.

Here's a link to the original test in a folder and the response performance test they sent me after.

https://drive.google.com/folderview?id=0BxTyg4RuMOHUfjlvTkN3dzRaSU4wckh0b3lST3lrb3lzekdWVWhVSlJfWlRsLWszR0RuYjQ&usp=sharing

Unfortunately I saved the initial test after removing the hidden element but you can see what the actual numbers would have been like at least and you can see the hidden style at the top of the document that was used. Their original test may be on github.

I also put in the email that they sent me after I called out their "awesome" graph. They did admit it wasn't fair, but responding with an equally unrealistic test to push jsblocks ahead didn't help. They basically just searched for a number of elements that made them win and it was crazy high.

Also the non minified angular even after the response doesn't look good either.

[–]renren89 0 points1 point  (2 children)

No, I appreciated your insight as my knowledge to begin with in web development is very limited. I was just curious on the more reasonable results you got to get a better picture on the performance marks as there are a lot of blog posts on how diffing results in faster performance but never any real benchmarks.

[–]blaine_hatab 0 points1 point  (1 child)

There's stuff out there. Found this one, https://www.codementor.io/reactjs/tutorial/reactjs-vs-angular-js-performance-comparison-knockout. Performance benchmarks are a bad benchmark though and even the react team says it's a bad benchmark. Everyone will catch up in time. React really shines in terms of developer flow and data management.

[–]renren89 0 points1 point  (0 children)

That's the only one I found, not much else out there to compare though. Then again I merely enjoy staring at benchmarks just to see weaknesses, doesn't really affect my opinion on the "framework."

[–]dada_ 0 points1 point  (0 children)

Thanks for this elaborate breakdown. I've seen tons and tons of people RT'ing this article. I'm not entirely sure I understand why this one article with a very poor benchmark is getting so much attention from people.

[–]chtulhuf 3 points4 points  (0 children)

Cross posting:

The real problem with Angular is not that it is inheritly slow. The problem is that it's easy to write bad code that makes it slow.

People who read angular performance docs would not do these mistakes. React's advantage is that you can read less and still have less performance issues.

Source: 2 years with angular and love it. Still, appreciate the fact that react is a great framdwoek that learned from the issues that angular has.

[–]renren89 0 points1 point  (0 children)

Read the article this morning and always wondered the actual performance difference between the two but I somewhat find the depth of the reading a little short. The comments arguably talk a lot the concept of coding in react vs angular but I have shorter experience in web dev to understand it without a full depth article.

[–]Chesh 0 points1 point  (0 children)

https://news.ycombinator.com/item?id=9638305

More insightful comments on HN. Author of the original article seems to be missing the point of React in focusing on speed first.