Parallel Processing / Speed Up Generation?
I am using Marp as part of a static site generation, in which i generate a slide cover image using --image jpg
I am running this against 40 presentations and it takes 1.5 minutes to process on github actions. I am doing the whole directory at one, so it seems like it would be trivial to parallelize the generation. Any ideas on how this could be done?
Thanks
Interesting. A one of possible ways is running Converter.prototype.convertFile() in parallel within Converter.prototype.convertFiles(), powered by worker_threads module.
https://github.com/marp-team/marp-cli/blob/89266418edcdea676d256d66702ad64b87416971/src/converter.ts#L273
I feel there are a lot of barriers to using multi processes than you thought, e.g. a shared Converter class, the process handling of a singleton Chromium launched by Puppeteer, and compatibility with post-processing such as --server, --watch, and --preview.