optimization app memory and construction