Optomized info autofit algorithm to use binary search