appirio-tech/arena-web — pull request #333 by Goodwine (2014-12-19 09:05:22+00:00)
Title: Fix #8 by improving performance on placement function

Fix for #8

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

(sorry for resubmission, renamed branch)