Add optimisation by entities grid.