debug performance in refine.