lanoxx/tilda — pull request #48 by Ed-von-Schleck (2014-03-08 16:23:28+00:00)
Title: Cleaned up finding of free lock instance

The previous algorithm had a O(n**2) list creation and O(n**2) search
for the lowest not-taken lock instance. One could argue that
the numbers involved are small enough to not make a difference, but
this version has a O(n logn) list creation and O(n) search without being
more complicated, so it might be worth it.

This is rebased on the current master and should merge cleanly. Sorry for the mess!