I'm trying to speed up the pdflatex compilation of a large number of latex files using multiprocessing or multithreading in Python. A simplified example of what I'm trying to do is below.
def do_create(params):
a = param[0]
b = param[1]
c = param[2]
call(["pdflatex", "--jobname=pdfs/%s/%s/%s"%(a,b,c), "template.tex"])
for A in ListA:
for B in ListB:
paramlist = [(A, B, C) for C in ListC]
paramlist = iter(paramlist)
with Pool(8) as p:
p.map(do_create,paramlist)
Is it possible to use pdflatex to compile multiple different tex files simultaneously in this way? Would it be better to use a multithreading-based approach instead?