Limit the maximum number of candidates.
Merge pull request #10 from 0674272bac/performance

Limit the maximum number of candidates.