memory optimize.