Added patch from: https://bitbucket.org/zeraien/mediagenerator-performance-fix