Optimize the neighborhood informations.