Trying to minimize memory usage for transforms.