reduce the temporary memory consume.