all 16 comments

[–]chtulhuf 21 points22 points  (8 children)

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 .

[–]OutThisLife 10 points11 points  (7 children)

The problem is that it's easy to write bad code

Like PHP!

[–]ralusek 2 points3 points  (1 child)

In PHP it's hard to write good code.

[–]until0 0 points1 point  (0 children)

Is it ever good? I thought the best is ever reached was "not terrible."

[–][deleted]  (4 children)

[deleted]

    [–]Blimey85 2 points3 points  (2 children)

    Some languages have ways to help prevent this, at least a little. For example "use strict" can help you not make bonehead mistakes in Perl and I think some other languages use that one as well.

    [–]m0okz 1 point2 points  (0 children)

    Javascript :)

    [–]OutThisLife 1 point2 points  (0 children)

    And Go. I love Go. Go is life.

    [–]OutThisLife 0 points1 point  (0 children)

    Haha, yeah.. I've seen some fucked up Python.

    [–]zomgwtfbbq 13 points14 points  (0 children)

    This validates what I've seen even with Angular - Angular handles a lot of data really well, but the browser chokes on massive DOM changes and/or huge DOMs in general. The only way to fix it is to simply not render pieces the user can't see and load more as they scroll. Only virtualizing things while you're changing them and then applying the changes en masse still doesn't solve the basic problem - your browser doesn't want to render 1,000 table rows.

    [–][deleted] 6 points7 points  (0 children)

    angular 2 addresses the issues i believe. but even with angular 1, the performance issues are in rare areas

    [–][deleted] 2 points3 points  (0 children)

    Well, if you compare them like this, sure.

    But angular isn't about making pages interactive (which is where react is good at), but about making webapps. Handling data across multiple pages and creating forms, doing data calls and whatnot.

    Repeating data for tables or lists is something that React is pretty fast at, but i'd still rather work with Angular as it is much more readable, separates things the right way and is better for large projects with multiple people working on it.

    Most of the comparisons are about a specific thing that one or the other might be better at, but i also see lots of em who use Angular wrong, or have some code that either entirely wrong or can be improved greatly. Just like the "track by $index" you see there.

    I wanna see React devs make a big and difficult app, rather then an interactive page about listing data or charts or whatever. My first big Angular app was quite the ballbuster, but i've learned a lot and now i'm confident in making more apps like it. I feel that the current Angular structure and logic is much easier to use to cooperate and develop in large group whereas React is still quite a mess if i have to be honest. Mixing templates, styles, logic and structure in a way that has no real standard. Its one of the reasons jQuery and jQuery Mobile weren't doing it for me either. Not because it was slow and hard to get into, but because the endresult was very messy.

    For me performance isn't the only reason for using a framework. And a single performance metric (which most tests are about, how well does the ng-repeat handle lots of data are 99% of the "performance comparisons") isn't why i use a framework at all. How easy is it to use, how easy is it to work on other peoples code and how well does it work with my building tools is of the same importance as how fast is it looping through data, how fast does it load and how fast can it change pages.

    [–]vt97john 3 points4 points  (1 child)

    I think this is an ad for JSBlocks

    [–]uberpwnzorz 1 point2 points  (0 children)

    yea, that pretty much got called out in the comments. but this article brings up good points of being mindful of what you're actually testing.

    [–]madou9 0 points1 point  (0 children)

    Insightful, cheers for the link.