Improve performance of 4a9f545903809428eea719274658134c3daef9de