Fix performance issues on server restart