make topN queue size heuristic more effecient