The svg generation takes more time from version plantuml.1.2018.9

0 votes
asked Oct 29 in Question / help by hicyo
Hi,

I tested several versions of Plantuml and I noticed that all versions created after 1.2018.8 take considerably more time for generating exactly the same set of svg files (150 files), around 1/3 of the total time.

1 Answer

0 votes
answered Oct 29 by plantuml (184,600 points)
Are you using preprocessing in your files ? Preprocessor implementation has been somehow reworked so it can have impact.

Few questions :

- Did you have the same generation time shift with PNG ? (this is to check if SVG generation is the real cause)

- Is it possible to get a diagram sample of yours that now takes more time ? It's difficult to solve the issue without example ?

- Could you also launch your diagram generation with -verbose flag (which prints time information) on both 1.2018.7 version and 1.2018.8 version ?

Thanks!
commented Oct 29 by mgrol (2,240 points)
IMHO this is not restricted to SVG. The general behavior changed and might be connected to multiple file includes (We had this discussion a couple of days ago with respect to !include_once and !include_many).
Here some tests that I did with different plantuml version and a file that consists of two diagrams that include a number of subsequent files.
To me it looks like the update from 10 to 11 did slow down the process by factor 6 or 7:

plantuml.1.2018.08.jar
(8.294 - 977 Mo) 581 Mo - Ok for com.sun.imageio.plugins.png.PNGMetadata
(8.324 - 977 Mo) 581 Mo - Number of image(s): 2

plantuml.1.2018.10.jar
(5.257 - 691 Mo) 174 Mo - Ok for com.sun.imageio.plugins.png.PNGMetadata
(5.292 - 691 Mo) 174 Mo - Number of image(s): 2

plantuml.1.2018.11.jar
(30.078 - 1028 Mo) 786 Mo - Creating image 618x137
(30.088 - 1028 Mo) 774 Mo - Ok for com.sun.imageio.plugins.png.PNGMetadata
(30.117 - 1028 Mo) 774 Mo - Number of image(s): 2

plantuml.1.2018.12.jar
(32.162 - 883 Mo) 591 Mo - Creating image 618x137
(32.170 - 883 Mo) 591 Mo - Ok for com.sun.imageio.plugins.png.PNGMetadata
(32.197 - 883 Mo) 591 Mo - Number of image(s): 2


plantuml.1.2018.13-beta2
(34.995 - 739 Mo) 582 Mo - Creating image 618x137
(35.005 - 739 Mo) 573 Mo - Ok for com.sun.imageio.plugins.png.PNGMetadata
(35.035 - 739 Mo) 573 Mo - Number of image(s): 2

BR,
Michael
commented Oct 29 by hicyo
With PNG generation it seems it is happening exactly the same.
Here is some information about svg generating for only 1 file in different versions. This file includes another one which only contains skinparams.

plantuml.1.2018.7
(0.827 - 47 Mo) 9 Mo - DotString size: 11971
(0.936 - 47 Mo) 8 Mo - Ending process ok
 (1.453 - 47 Mo) 7 Mo - Number of image(s): 1

plantuml.1.2018.8
 (0.905 - 50 Mo) 32 Mo - DotString size: 11971
(1.029 - 50 Mo) 32 Mo - Ending process ok
 (1.544 - 50 Mo) 32 Mo - Number of image(s): 1

plantuml.1.2018.9
 (1.107 - 83 Mo) 24 Mo - DotString size: 11971
(1.216 - 83 Mo) 24 Mo - Ending process ok
 (1.778 - 83 Mo) 68 Mo - Number of image(s): 1

From version 9, the results are very similar. It does not matter whether the diagram is simple or complex.

In the real usage, I generate with Java:
try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
                source.outputImage(os, new FileFormatOption(FileFormat.SVG));
                String imageContent = os.toString();
                imageSubSequence = imageContent.subSequence(0, imageContent.length());
            }

Regards
commented Nov 4 by plantuml (184,600 points)
Some improvements have been done with last beta http://beta.plantuml.net/plantuml.jar
However performances are highly related to input data so it's difficult to know in your case what will be the result. You tell us :-)
commented Nov 5 by mgrol (2,240 points)
Hi,
the fix does the job. 1.2018.12 takes  ~23 seconds, the current beta is ~8 seconds.
BR,
Michael
...