Live data from Hacker News

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

twitter.com

131–140 of 187 posts

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

#131

Earlier quoted context omitted.

This is a good start, but it has issues. You probably don't want all of your locally installed packages in a requirements.txt file. Instead, they should be curated. I've been using pip-compile [0] for a while now (see the author's blog post [1] for a detailed explanation) and have become a big fan of it. With this model, you should enumerate only what your application uses directly and let pip-compile convert this li…

If one uses virtualenv as a Pythonista should, then your keep point doesn't carry much weight. That said, this looks cool and I'll check it out.

This should be used with virtualenv, not as an alternative to it. I have a bunch of libraries and tools in almost all of my virtual environments that are not application dependencies and have no business being installed in my production environment (e.g. bpython, tox, flake8, and neovim). This approach also handles things like a dependency being dropped gracefully (if some library no longer needs a dependency, it magically gets removed from your locked requirements.txt next time you compile requirements.in). Python's package management tools are making great strides (see pip's recent peep-style hash checking support), and pip-compile is a big win in that category in my opinion.

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

#133

Earlier quoted context omitted.

This is not only completely wrong, it's dangerously wrong. It is in fact wildly unsafe to touch the GUI from anything except the main thread. It's all the non-UI stuff that you should shove onto another thread.

Depends on what you call "main thread" - maybe he's saying worker thread that's doing the "main code" shouldn't be doing GUI

In other languages / frameworks, "main thread" may have flexible semantics, but in the land of iOS, UIKit defines the term "main thread" to have one specific meaning.

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

#134
post #107

I work in China. Downloading from the outer Internet will never match the speed of writing to the console. Not too worried

Not to mention that when the binary you are downloading happens match particular keywords.

Oh, that's fine. You can just download it from one of those mirror sites that host their own copies of the files. You can trust that it's genuine because of that big green checkmark on the page.

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

#135

Earlier quoted context omitted.

This is not only completely wrong, it's dangerously wrong. It is in fact wildly unsafe to touch the GUI from anything except the main thread. It's all the non-UI stuff that you should shove onto another thread.

Depends on what you call "main thread" - maybe he's saying worker thread that's doing the "main code" shouldn't be doing GUI

So... GUI work goes on its own thread, however that works out

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

#137
post #89

Earlier quoted context omitted.

This is backward. Since UIKit is single threaded, the main thread must work on GUI: the best practice is that nothing except GUI work should happen there.

You're not being charitable enough to the comment... you two are in completely agreement with one another if you only changed the meaning of the word "main". It's clear the grandparent meant "the thread that's doing the work."

except on iOS GUI thread kinda has "main" attached to it, main_queue

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

#138

Earlier quoted context omitted.

> are you suggesting that by default you should vet every version exactly and freeze it at the point you defined it? Yes, this is the way that Guix and Leiningen and rebar3 and a bunch of other things work, and it is wonderful. Pulling in new code without you asking is a fine idea for something like apt-get where you have a huge team doing QA on the entire system working together before it even hits your repositories…

If you want to do this in ruby you can just specify a version manually. If you don't, you still get versions frozen by default with Gemfile.lock. It doesn't pull in anything automatically—by default you get no updates, you can choose to update a single dependency, or the whole thing if you want to verify it works on the latest (useful for libraries for instance). I'm not sure I see the downside. FWIW I have been doin…

> I hold up Bundler as one of the great success stories of open source

It's a great success in many ways, but the problem it solves is completely self-inflicted by rubygems. I've also been doing Ruby for over a decade, but I've also learned a lot from other library ecosystems, and I feel pretty confident saying that disallowing version ranges makes all those headaches completely evaporate.

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

#139

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 lo…

> What you have to do is create a thread [...] A thread? But that'll never scale!

you dont need a cluster to display GUIs.

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

#140

Earlier quoted context omitted.

just gugel it

Heh, just "ied" will give you this: https://en.wikipedia.org/wiki/Improvised_explosive_device "ied package manager" works, though.

That sounds like just begging to be put on a list, though :)
Post reply on HN