optimize splitrect