Performance improvement for grid.