RiotGames/berkshelf — pull request #392 by erikh (2013-03-01 03:23:14+00:00)
Title: fix lockfiles, improve cache performance across the board

So, it helps when you have a cache to actually use it, and when you do use it, to not make it so slow that downloading it is faster than reading it off a local SSD.

These patches do that against 1.1.6 by short pathing across the board and fixing lock files. This would have been easier if the resolver critical path wasn't a giant pile of spaghetti, which I'm pretty sure is why update is still dog slow but I don't have time to fix everything.

Results against a corpus of around 100 cookbooks, most of them from git (but some of them from the cookbooks api) that are already in cache:

```
before (1.1.6 gem from rubygems.org):
berks install --path cookbooks 58.73s user 18.32s system 18% cpu 6:51.95 total

after:
berks install --path cookbooks 5.00s user 2.08s system 79% cpu 8.904 total
```

7 minutes down to 9 seconds. You judge for yourself.

Feel free to merge it, no tests, no author changes. Largely just sending the PR here so you don't put your name on this too and pretending like you wrote it between telling people how to code and fighting for the user. I plan to run off my fork.

And to think, we started this thing because librarian was slow. Shame shame.

HAND.