appirio-tech/arena-web — pull request #329 by Goodwine (2014-12-16 08:50:12+00:00)
Title: Fix #8 by improving performance on placement function

Current placement function bubbles every coder's rank down until the placement is assigned to everyone, taking over a minute for 35k~ records.

This pull-request sorts the array first hand descendingly by `totalPoints`, and then assigns coder's rank (placement), taking around 30ms on the same amount of records.

Current: https://gist.github.com/Goodwine/e719e1954aec742ea190
Proposed: https://gist.github.com/Goodwine/5e153dc05467aa3df518