gitlabhq/grit — pull request #2 by nathanvda (2012-06-04 21:30:23+00:00)
Title: further improving performance

Further related to gitlab issue https://github.com/gitlabhq/gitlabhq/issues/842 : the counting is now much faster, but listing all the branches and tags (for the dropdown select) is still slow.

So what did I do: instead of creating the commit for each tag we find, we store the commit-id instead, and only lookup the commit when we really need it. This speeds up the retrieval for showing in the select-box enormously.

Also, this greatly speeds up things like `tags.count` and `tags.first`, effectively even rendering my previous change nearly unneeded.

Once this is merged, one only needs to update the `:ref` in the Gemfile to make the changes valid.