reduce memory required