question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Publishing speed slower with Java 17 than with Java 1.8 [Windows]

See original GitHub issue

Expected 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

  1. Download https://github.com/oxygenxml/userguide
  2. Publish “DITA/UserManual.ditamap” to HTML5 using default params and Java 17
  3. Publish “DITA/UserManual.ditamap” to HTML5 using default params and Java 8
  4. 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:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
raducoravucommented, Jun 5, 2022

@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.

1reaction
raducoravucommented, Jun 1, 2022

@chrispy-snps great thanks for taking the time to put this together.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found