6 ms·
Much slower, why?
by bikamonki 12y ago
Much slower, why?
- devfactor-io 12y agoAngular is naturally a poor choice for social networking sites. The reason being, is because the 2 way data binding requires a metric crap ton of listeners. Once you hit about 1000 listeners Angular tends to crap out a bit. It is better for dynamic sites hosting more or less static content. Not for social.
- spartanatreyu 12y agoAngular 2 is built for tomorrow. It uses a lot of apis either not available (and so must be shimmed which is slow) or not optimised in today's browsers.
- djm_ 12y ago> Angular 2 is built for tomorrow. If tomorrow means we're going to give up serving any HTML on first render and pretend that performance doesn't matter, then yes, it's built for tomorrow. As an aside: Meteor is in the same slowly sinking boat. React is not as you can easily render server side before pushing that initial page to the client.
- bsimpson 12y agoIt's all coming around. React taught the value in using a virtual DOM for isomorphic rendering. Ember is adopting it with Fastboot, and I'm sure Angular will end up doing something similar.
- quaunaut 12y agoI'm not an Angular user(Ember here), but in time all of the major frameworks will allow for serverside rendering. The React model works very well, and most projects are taking a lot of ideas from it. Ember will have fastboot in a couple of months to match the same idea, and it won't even require any custom code- it'll be little more than 'drop in, run server', and you're good for life. I expect a lot of other frameworks take a similar approach not long from now.
- djm_ 12y agoIt's really great to hear that, thank you. Nice to know the performance crowd's rants are eventually being heard.
- quaunaut 12y agoYup. And Ember's getting even ridiculously fast post-load, too, thanks to Glimmer. When it comes out, it should be the fastest full-fledged framework. I'm sure the others will catch up super soon though!
- deleted 12y ago[deleted]
- ralusek 12y agoSo much misinformation here. For one, Angular 2 will allow for server side rendering as well, as it doesn't rely on a DOM. Secondly (and I already linked this in a separate comment), I built a very ugly but effective reddit angular client that receives no HTML whatsoever and renders pretty much instantly. This is in Angular 1.3 and much slower than Angular 2.0: http://bredd.it.s3-website-us-west-1.amazonaws.com/ http://bredd.it.s3-website-us-west-1.amazonaws.com/
- douche 12y agoThat's kind of a waste for something like the HackerNews site. It's just dog-simple HTML. There are a handful of vanilla JS functions to run the voting buttons (at least that I can see). It seems like a use-case that would be perfect for server-side templating like Razor.
- hswolff 12y agoFYI: The angular team is working on server side rendering: https://docs.google.com/document/d/1q6g9UlmEZDXgrkY88AJZ6MUrUxcnwhBGS0EXbVlYicY/edit#heading=h.19ijfd7mxdt4 https://docs.google.com/document/d/1q6g9UlmEZDXgrkY88AJZ6MUr...
- fadsasda432 12y agoThis is not a critique to the author, but for me, who just did classic webdev (server side templated html), this was very surprising. I am not that into webdev, but shouldn't a page like HN be fast TODAY, as it has very basic functionality (CRUD)? I mean if this is slow, how can I expect acceptable performance from involved applications?
- error54 12y agoI think it's the firebase api that's slowing everything down.
- djm_ 12y agoThe problem is the site is not sending any (useful) HTML during the first HTTP request. Therefore the browser has to wait for the JS to render the page before it can even think about displaying anything. The fact the site then loads content from firebase is obviously a problem, but it's not so much firebase's problem as it is of the codebase itself - in an ideal world it should be rendering the initial HTML to send to the client on the server. I have seen React based websites with server side rendering work with firebase with much better performance.
- nperez 12y agoWell, it seems to be loading data in via websockets. Compared to server-side rendering of cached data, that's not going to be performant.