LaTeX and R should not be installed for each job
Make it so LaTeX / R do not need to be installed again each measurement while also reducing the packages installed to only those necessary.
One idea is to create an image for LaTeX and R and move to a docker file.