Live data from Hacker News

Disabling npm's progress bar yields a 2x npm install speed improvement

twitter.com

61–70 of 187 posts

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#61
post #21

Earlier quoted context omitted.

> Color and terminal graphics are the work of the devil. Or you know, it's 2016, and it's npm who does it badly.

I don't even want color and terminal graphics done goodly. I code with two monochrome terminals on the screen using vim and the command line.

You don't use syntax highlighting?

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#62
post #6

The funky progress bar is about the coolest thing with npm. They could let it take a minute if they wanted too and i would keep watching it with amazement.

Your statement captures my feeling of node.js developers quite well.

lol yeah, people who write code in languages I don't like are total tools.

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#63

Earlier quoted context omitted.

https://www.youtube.com/watch?v=elWIVKWhWTk

I see that with iTerm 2, but using Terminal gives me a very different experience. Here's a side-by-side: https://youtu.be/odoVfHHBYVM Until recently, I had no clue iTerm was doing something weird. I just figured npm install was just ugly and incomprehensible.

heh

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#64
post #19
post #7

Earlier quoted context omitted.

Please refrain from adding unhelpful comments to the issue.

It is tremendously unfortunate that that needs to be said at all.

I think bug tracker comment forms for open source projects need some kind of question first (at least from people who aren't active contributors), like "Please select your type of comment":

* Nontechnical: I would like to express my eagerness that the bug be fixed or request its priority be increased, but don't have any additional technical information to add

* Technical: I have useful technical information to add, beyond what is already in the bug

Then "Nontechnical" type comments would be hidden from the developers by default (unless they specifically ask to see them), but their count could be used as a bug prioritisation mechanism (effectively leaving a "Nontechnical" type comment would be counted the same as a vote)

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#65

Earlier quoted context omitted.

Here are details from the docs: https://docs.npmjs.com/how-npm-works/npm3-nondet

> You can reliably get the same dependency tree by removing your node_modules directory and running npm install whenever you make a change to your package.json. https://docs.npmjs.com/how-npm-works/npm3-nondet

That explains why I haven't experienced it -- our projects' npm scripts to build packages wipe out that folder before building.

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#66
post #19

Earlier quoted context omitted.

It is tremendously unfortunate that that needs to be said at all.

I guess it's GitHub's Eternal September. I'm all for more people having access to development tools, but GitHub really has to step up the tools available for managing issues/comments.

There is this open letter to github from open source maintainers: https://github.com/dear-github/dear-github

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#67
post #50
post #48

Earlier quoted context omitted.

That's exactly my experience. Once I wrote some naive PE solution in nodejs and added some logging at each step. After few minutes and far from a solution I stopped it and disabled logging. I got the solution within seconds. The diff was few orders of magnitude, which was pretty surprising for me.

Sometimes writing to the terminal can be the slowest part because it's unbuffered by default in an interactive prompt, so even just redirecting stdout to /dev/null (or even a file) can be faster. Had that happen some ten years ago, so my explanation could be out of date or misremembered but the effect was real.

Your explanation is correct. That is the semantics of Unix stdio buffering as implemented by glibc. So across a wide variety of languages, you'll see a significant performance difference if you are doing lots of writes to the terminal.

On the other hand if you didn't do this, then interactive terminal programs would be entirely unusable.

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#68
Doing GUI calls is a notorious way to slow down apps. I sped up an app (major software from major large corporation) by a factor of 10x a few years back by removing GUI updates. What you have to do is create a thread that refreshes the GUI periodically and not let your main worker thread ever work on the GUI. This particular app was an Eclipse Plugin (a source control app) and the Eclipse SWT to update the console log window was being called after every file operation (of which there were 10s of thousands). All I did was move the GUI refreshing into it's own thread, and call it only every 250millis or so. I was hailed a hero, and deservedly so, for speeding up our app by 10X and was one of my most satisfying accomplishments in my software career.

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#69
post #11

Earlier quoted context omitted.

Awesome tool, but wish the url was a bit easier to spell/remember!

I'm not sure "IED" is the best acronym to go for, either: https://en.wikipedia.org/wiki/Improvised_explosive_device

It gets brought up on a regular basis. Thought it was going to be renamed to `nom` but apparently not.

https://github.com/alexanderGugel/ied/pull/45#issuecomment-1...

> Thanks, but I'm not going to rename this project anytime soon.

Re: Disabling npm's progress bar yields a 2x npm install speed improvement

#70
post #36
post #14

Earlier quoted context omitted.

npm 2.x user here. Does anybody want to share a video of the 3.x progress bar? (Easy with QuickTime or CloudApp, btw)

https://asciinema.org/a/9gt0i1kxbto41gj4796tjkdnt

What's the color scheme you're using for terminal? I'm also rocking agnoster.
Post reply on HN