Improving performance of wafflejs when the number of flags on db grows.