Publishing speed slower with Java 17 than with Java 1.8 [Windows]
See original GitHub issueExpected Behavior
I publish on Windows a large (about 2000 topics) DITA Map to HTML5 with default settings: https://github.com/oxygenxml/userguide/blob/master/DITA/UserManual.ditamap With both Java 17 and 1.8 they should get published in about the same time.
This continues on this comment I added here some time ago: https://github.com/dita-ot/dita-ot/issues/3621#issuecomment-720276269
Actual Behavior
With Java 1.8 it gets published in about 253 seconds, with Java 17 it gets published in about 400 seconds.
Possible Solution
- Set the -Dsun.io.useCanonCaches=true system property in the dita script file which starts the Java process. There was a change in Java 12 which changed default for the cache to
false
. As the DITA OT works intensively with files, enabling this property seems to make a big difference and remove this large publishing time difference between Java 1.8 and 17… - Setting
store-type=memory
as a parameter also helps as a workaround to reduce the publishing time with Java 17.
Steps to Reproduce
- Download https://github.com/oxygenxml/userguide
- Publish “DITA/UserManual.ditamap” to HTML5 using default params and Java 17
- Publish “DITA/UserManual.ditamap” to HTML5 using default params and Java 8
- Compare publishing times
Environment
Windows, Java 17 Eclipse Adoptium
- DITA-OT version: 3.7
- Operating system and version: Windows
- How did you run DITA-OT?
(
dita
command) - Transformation type: (HTML5.)
Issue Analytics
- State:
- Created a year ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Java 17 features: A comparison between versions 8 and 17
In this article, we will explore the most important Java 17 features, differences between these two versions, and their implications for Java ......
Read more >It's time to move your applications to Java 17. Here's why ...
It's reasonable to wonder, especially if your applications run perfectly well on Java 8, Java 11, Java 14, or whatever version you are...
Read more >How fast is Java 17 for number crunching? - Uster Metrics
Overall Java 17 is faster than Java 11 and Java 8. Java 17 is almost on par with C on the smaller problem...
Read more >How much faster is Java 17? - Hacker News
"New Relic found that nearly 100 percent of users are running either JDK 11 or JDK 8, the two most recent LTS releases."...
Read more >How much faster is Java 17? - OptaPlanner
Java 17 is 8.66% faster than Java 11 and 2.41% faster than Java 16 for G1GC (default). Java 17 is 6.54% faster than...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chrispy-snps @jelovirt for consistency sake maybe we could add the flag in both dita scripts. Even if it just shaves off a few seconds on Linux it still makes the processing more efficient and consumes less CPU resources.
@chrispy-snps great thanks for taking the time to put this together.