Improve mem consumption