Performance improvements for refresh and histview