How to run many plantuml in parallel?

0 votes
asked Jun 11, 2021 in Bug by Song

Hello, I'm trying to speed up the render of many UML files at the same time. I thought each instance of plantuml JAR would be able to run independently from each other. However, that is not the case. I get a resource occupied error about dot.exe from _graphviz.

java.io.FileNotFoundException: C:\Users\Song\AppData\Local\Temp\_graphviz\dot.exe (The process cannot access the file because it is being used by another process)

You can use this bash code segment to run things in parallel.

```

    N=2

    (

        for file in *.plantuml; do

            ((= i % N))

            ((i++ == 0)) && wait

            plantuml"$file" &

        done

    )

```

1 Answer

0 votes
answered Jun 11, 2021 by The-Lu (37,800 points)

Hello S.,

If you would test speed or performance, perhaps, you could just test:

java -jar  plantuml.jar

or

java -jar  plantuml.jar C:\Path\to\yours\files

That runs the GUI, and it avoids creating the context for each file on each time...

In order to testing,
Regards,
Th.

...