See my comment about performance in this method