Currently I am trying to optimize the export process of Story Swag for the new video feature that will be coming out any time. Users will have the ability to add videos instead of simply photos into the slide show export. Right now I am doing the last checks and attempts to optimize the experience before we release. Either way this decision to optimize has trade offs. If we preprocess user videos in the background, we are using what could be excessive battery and cpu resources. By preprocessing we are saving around 35% on the export time.
My plan at the moment is to use an OperationQueue and limit the number of videos that can be processed in the background to two. This might need testing across weaker devices to make sure they can handle it. Once this update ships, I plan on sharing things I have learned and some code examples. It has been one heck of a journey through AVFoundation.