Live data from Hacker News

Improving Angular performance with 1 line of code

medium.com

21–30 of 118 posts

Re: Improving Angular performance with 1 line of code

#21
post #2

Shouldn't debugging be something you opt-in to rather than opt-out of? Seems like a weird design choice

Django has DEBUG set to True by default, too.

They have a fairly obvious "SECURITY WARNING: don't run with debug turned on in production!" above it though.

Re: Improving Angular performance with 1 line of code

#25
post #2

Shouldn't debugging be something you opt-in to rather than opt-out of? Seems like a weird design choice

It's the same design choice as most C compilation toolchains: you get debug symbols during the compilation process, and you can strip the binaries later if you want.

Re: Improving Angular performance with 1 line of code

#26
As someone who's specialized in AngularJS optimization [0], this doesn't surprise me in the least. Developers leave plenty of performance optimizations on the table, some worse than this one. The truth of the matter is that in the general case, it doesn't matter. We engineers like to go on and on about this or that perf efficiency but most of the time the code runs fast enough (and the majority of the time when it doesn't, ads are to blame over framework tweaks).

Heck, I shouldn't even be saying this as it'll cut into my very lucrative field but unless you've got a confirmed performance problem, you shouldn't think about it at all. Really. Leave all of the fancy perf tweaks behind. Sure, you might get ridiculed on Medium but that's par for the course here on the internet. I'm afraid articles like these will cause lots of cargo-cult 'optimization' that just makes the job harder for future devs.

Make it work, make it work well, THEN make it work fast.

[0] I wrote Batarang's new perf panel before Google abandoned the project

Re: Improving Angular performance with 1 line of code

#27
What the author discovered is really shitty defaults for Angular. Most software is like that. Don't blame the developers using the software, blame the Angular developers for choosing shitty defaults. Instead of choosing production ready defaults, they chose development ready defaults, creating more work for everyone.

Re: Improving Angular performance with 1 line of code

#28
post #27

What the author discovered is really shitty defaults for Angular. Most software is like that. Don't blame the developers using the software, blame the Angular developers for choosing shitty defaults. Instead of choosing production ready defaults, they chose development ready defaults, creating more work for everyone.

My experience is that Ember.js does a good job in that area. Through ember-cli they provide sane defaults when deploying for production vs a local development environment.

Re: Improving Angular performance with 1 line of code

#29

I've searched a few minutes for any blog post or article which demonstrates the performance difference between turning this setting on or off, and I haven't found anything. If you don't have a benchmark, you don't have a performance boost.

This is a silly statement. Not everything is placebo. I'm working on a bigger Angular application and adding this one line of code made a small perceivable difference.

Re: Improving Angular performance with 1 line of code

#30
post #25
post #2

Shouldn't debugging be something you opt-in to rather than opt-out of? Seems like a weird design choice

It's the same design choice as most C compilation toolchains: you get debug symbols during the compilation process, and you can strip the binaries later if you want.

It's a little different though, as debug symbols won't slow down the execution of a compiled program, they just take up space in the binary.
Post reply on HN