Fixed calendar layout performance issues