reduce memory usage for tasks