Calling image.CGImage is loading the image into memory.
You can try to use
CIImage *ciImage = [CIImage imageWithContentsOfURL:imageUrl options:@{kCIImageColorSpace:[NSNull null]}];
CIImage *ciImage = [CIImage imageWithCGImage:first.CGImage options:nil];
instead of
CIImage *ciImage = [CIImage imageWithCGImage:uiImage.CGImage options:nil];
Another options is to tile the image, apply the filters on the tiles and then stitch them together again..