Estimated read time: 2 minutes
Background: I was benchmarking Online vs jodconverter vs unoconv the other day
for Collabora’s document
conversion page. One problem with measuring unoconv performance was that it
provided no ways to run multiple
unoconv processes in parallel, while the
soffice binary obviously allows this.
unoconv is not capable of launching the
soffice process in a chroot
(improves security), nor is capable of forking an already pre-initialized
soffice process (improves performance, both are things Online can do for you),
there is no real reason why you should not be able to run multiple
processes in parallel. The previously mentioned benchmarking would be quite
unfair if even this kind of multiprocessing would be ignored, but unoconv had
no way to specify a custom user profile, which has to be different for each
So I filed a GitHub pull request on 1st Jun, and finally it was merged on 10th Aug.
Here is how you can use it for example:
unoconv --user-profile /tmp/tmpf_yreswi -f pdf --port 2002 test.txt
|It’s your responsibility to give --port a unique value, but that’s not
too hard: if you use a thread pool to launch the
unoconv processes, then you
can add the thread index to a base port and that will give you a unique port.
So this is available in unoconv master (towards unoconv 0.8.2+1), you can grab the sources from git and try it out right now. :-)