commit before trying to reduce memory usage