<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">We've had no reports of issues with Clojure 1.10 anywhere else (and really, very little has changed that should affect startup time). I regularly run Clojure 1.10 on Java 8-11 and have not noticed any significant differences. The JVM itself did get a bit worse on 9, then better again on 10 and 11 (see <a href="https://cl4es.github.io/2018/11/29/OpenJDK-Startup-From-8-Through-11.html">https://cl4es.github.io/2018/11/29/OpenJDK-Startup-From-8-Through-11.html</a>), but not of this magnitude.<div><br></div><div>Some things I would look at:</div><div><br></div><div>- Try with -Dclojure.spec.skip-macros=true to see if any difference (skips spec macro checking which could possibly affect startup time)</div><div><br></div><div>- Check that you're actually using AOT'ed Clojure. In the clojure jar file, typically you'll see both .class and .clj files. The timestamps matter! If the .clj is newer than the .class files, it will use the .clj and recompile. I have certainly seen people run into this kind of problem with builds that don't retain timestamps properly for whatever reason (the Maven shade plugin is a notorious culprit, but we don't use that in the Clojure build). </div><div><br></div><div>In general, I'd say *all* of these times look super slow to me - I would expect in the ballpark of 1s. I'm also curious what is in those jars - do they include the spec libs too? If so, that seems weird to me.</div><div><br></div><div>On my new-ish macbook pro (my 5 yo MBP is not much slower):</div><div><br></div><div>#### Java 11 (build 11+28), Clojure 1.10</div><div><br></div><div><div>$ time java -cp /Users/alex/.m2/repository/org/clojure/clojure/1.10.0/clojure-1.10.0.jar:/Users/alex/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar:/Users/alex/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar clojure.main -e '"hi"'</div><div>"hi"</div><div><br></div><div>real<span style="white-space:pre"> </span>0m0.758s</div><div>user<span style="white-space:pre"> </span>0m1.217s</div><div>sys<span style="white-space:pre"> </span>0m0.089s</div></div><div><br></div><div>#### Java 8 (build 1.8.0_181-b13), Clojure 1.10</div><div><br></div><div><div>$ time java -cp /Users/alex/.m2/repository/org/clojure/clojure/1.10.0/clojure-1.10.0.jar:/Users/alex/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar:/Users/alex/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar clojure.main -e '"hi"'</div><div>"hi"</div><div><br></div><div><div>real<span style="white-space:pre"> </span>0m0.760s</div><div>user<span style="white-space:pre"> </span>0m1.310s</div><div>sys<span style="white-space:pre"> </span>0m0.090s</div></div></div><div><br></div><div>#### Java 11 (build 11+28), Clojure 1.9<br></div><div><br></div><div><div>$ time java -cp /Users/alex/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar:/Users/alex/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar:/Users/alex/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar clojure.main -e '"hi"'</div><div>"hi"</div><div><br></div><div>real<span style="white-space:pre"> </span>0m0.828s</div><div>user<span style="white-space:pre"> </span>0m1.301s</div><div>sys<span style="white-space:pre"> </span>0m0.086s</div></div><div><br></div><div>#### Java 8 (build 1.8.0_181-b13), Clojure 1.9</div><div><br></div><div><div>$ time java -cp /Users/alex/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar:/Users/alex/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar:/Users/alex/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar clojure.main -e '"hi"'<br></div><div>"hi"</div><div><br></div><div>real<span style="white-space:pre"> </span>0m0.761s</div><div>user<span style="white-space:pre"> </span>0m1.297s</div><div>sys<span style="white-space:pre"> </span>0m0.087s</div></div><div><br></div><div>#### Java 11 (build 11+28), Clojure 1.8<br></div><div><br></div><div><div>$ time java -cp /Users/alex/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar clojure.main -e '"hi"'</div><div>"hi"</div><div><br></div><div>real<span style="white-space:pre"> </span>0m0.705s</div><div>user<span style="white-space:pre"> </span>0m1.220s</div><div>sys<span style="white-space:pre"> </span>0m0.091s</div></div><div><br></div><div>#### Java 8 (build 1.8.0_181-b13), Clojure 1.8</div><div><br></div><div><div>$ time java -cp /Users/alex/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar clojure.main -e '"hi"'</div><div>"hi"</div><div><br></div><div>real<span style="white-space:pre"> </span>0m0.623s</div><div>user<span style="white-space:pre"> </span>0m1.001s</div><div>sys<span style="white-space:pre"> </span>0m0.076s</div></div><div><br></div></div></div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 5, 2019 at 10:54 PM Elana Hashman <<a href="mailto:ehashman@debian.org">ehashman@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Alex (+cc team),<br>
<br>
I'm working on upgrading Clojure 1.9 in Debian to Clojure 1.10.<br>
<br>
I noticed when running my very brief autopkgtest suite that the tests<br>
were unusually slow. Sure enough, I seem to have hit some sort of<br>
startup time degradation. Here's some tests run with various JDKs:<br>
<br>
elana@debian:/debian$ time /usr/lib/jvm/java-8-openjdk-amd64/bin/java -cp /usr/share/java/clojure-1.10.jar clojure.main -e '"hi"'<br>
"hi"<br>
<br>
real 0m5.032s<br>
user 0m18.415s<br>
sys 0m0.529s<br>
elana@debian:/debian$ time /usr/lib/jvm/java-9-openjdk-amd64/bin/java -cp /usr/share/java/clojure-1.10.jar clojure.main -e '"hi"'<br>
"hi"<br>
<br>
real 0m6.674s<br>
user 0m22.503s<br>
sys 0m0.631s<br>
elana@debian:/debian$ time /usr/lib/jvm/java-10-openjdk-amd64/bin/java -cp /usr/share/java/clojure-1.10.jar clojure.main -e '"hi"'<br>
"hi"<br>
<br>
real 0m6.231s<br>
user 0m20.863s<br>
sys 0m0.604s<br>
elana@debian:/debian$ time /usr/lib/jvm/java-11-openjdk-amd64/bin/java -cp /usr/share/java/clojure-1.10.jar clojure.main -e '"hi"'<br>
"hi"<br>
<br>
real 0m13.794s<br>
user 0m34.169s<br>
sys 0m0.695s<br>
<br>
It's also substantially slower than 1.8 and 1.9 on JDK11:<br>
<br>
elana@debian:/debian$ time clojure1.9 -e '"hi"' # alias for the command line above<br>
"hi"<br>
<br>
real 0m9.996s<br>
user 0m23.960s<br>
sys 0m0.577s<br>
elana@debian:/debian$ time clojure1.8 -e '"hi"'<br>
"hi"<br>
<br>
real 0m9.941s<br>
user 0m24.713s<br>
sys 0m0.618s<br>
<br>
Debian Buster isn't going to ship with JDK8, unfortunately, so I'm<br>
hoping we can figure out the source of the issue in order to get 1.10<br>
into the release. I just discovered the performance regression on my<br>
latest build so I haven't had much time to dig into root causes, but I<br>
wondered if you were aware of any performance issues with Clojure 1.10<br>
on JDK11.<br>
<br>
Throwing some possible things out there: more weirdness from<br>
reproducible builds (I don't think Clojure is reproducible yet anyways),<br>
bytecode recompilation due to mismatch (would be weird, I'm building it<br>
with JDK11), ...<br>
<br>
I think it would also be good to check 1.8 and 1.9 on JDKs 8-10 to<br>
compare results (but I haven't had the chance to do so).<br>
<br>
Cheers,<br>
<br>
- e<br>
</blockquote></div>