This means, it has to be installed on a machine manually before it can be used from Java. What’s more, to generate a graphic, one has to create a string containing the diagram in dot format and send this string to a Graphviz process. Not very user friendly.
continue.) I know that Rhino is not perfectly standard compliant, so I gave up.
Next thing was to create a nice API to create an object model of a graph instead of using plain strings. Some hours later, a first version of it was ready and I created some nice graphics.
Playing around with the API, it became more and more painful that the generation process was really slow. Initializing the engine took around 20s and then generating a graphic was also a thing of seconds.
I made some quick performance comparison and there are the results:
V8 is one to three orders of magnitude faster than Nashorn. Typical delays are in the milliseconds range, not seconds. The Java engine is probably not that bad, but V8 is simply incredibly fast.
Thanks to it, the whole project is perfectly usable. And my weekend was not spent totally in vain. Standing on the shoulders of the giants Graphviz, Emscripten and V8, it was possible to achieve something useful in very little time. The project is on GitHub as well as in Maven central.