<html><head><meta http-equiv="Content-Security-Policy" content="script-src 'self'; img-src * cid: data:;"><style id="outgoing-font-settings">#response_container_BBPPID{font-family: initial; font-size:initial; color: initial;}</style></head><body style="background-color: rgb(255, 255, 255); background-image: initial; line-height: initial;"><div id="response_container_BBPPID" style="outline:none;" dir="auto" contenteditable="false"> <div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;"> Mm, given all that, my guess is that this is an AOT compilation issue. I'll have to dig deeper into where that's coming from.</div><div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;"><br></div><div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;">Don't let the slow startup times worry you too much. The machine I build on is a Dell Poweredge 2950 (yes, released in 2006). I test on old, slow hardware in Debian to keep myself honest ðŸ˜„</div><div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;"><br></div><div name="BB10" id="BB10_response_div_BBPPID" dir="auto" style="width:100%;">- e</div>                                                                                                                                      <div name="BB10" id="response_div_spacer_BBPPID" dir="auto" style="width:100%;"> <br style="display:initial"></div>                            <div id="blackberry_signature_BBPPID" name="BB10" dir="auto">     <div id="_signaturePlaceholder_BBPPID" name="BB10" dir="auto"></div> </div></div><div id="_original_msg_header_BBPPID" dir="auto">                                                                                                                                             <table width="100%" style="background-color: white; border-spacing: 0px; display: table; outline: none;" contenteditable="false"><tbody><tr><td colspan="2" style="padding: initial; font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);">                           <div style="border-right: none; border-bottom: none; border-left: none; border-image: initial; border-top: 1pt solid rgb(181, 196, 223); padding: 3pt 0in 0in; font-family: Tahoma, "BB Alpha Sans", "Slate Pro"; font-size: 10pt;">  <div id="from"><b>From:</b> alex@puredanger.com</div><div id="sent"><b>Sent:</b> February 6, 2019 12:42 AM</div><div id="to"><b>To:</b> ehashman@debian.org</div><div id="cc"><b>Cc:</b> pkg-clojure-maintainers@alioth-lists.debian.net</div><div id="subject"><b>Subject:</b> Re: Major Clojure 1.10 performance degredation on JDK11</div></div></td></tr></tbody></table> <br> </div><!--start of _originalContent --><div name="BB10" dir="auto" style="background-image: initial; line-height: initial; outline: none;" contenteditable="false"><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 -<wbr><a href="http://Dclojure.spec.skip">Dclojure.spec.skip</a><wbr>-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/<wbr><a href="http://clojure-1.10.0.jar">clojure-1.10.0.jar</a><wbr>:/Users/alex/.m2/repository/org/clojure/<wbr><a href="http://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">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</a><wbr> <wbr><a href="http://clojure.main">clojure.main</a><wbr> -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/<wbr><a href="http://clojure-1.10.0.jar">clojure-1.10.0.jar</a><wbr>:/Users/alex/.m2/repository/org/clojure/<wbr><a href="http://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">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</a><wbr> <wbr><a href="http://clojure.main">clojure.main</a><wbr> -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/<wbr><a href="http://clojure-1.9.0.jar">clojure-1.9.0.jar</a><wbr>:/Users/alex/.m2/repository/org/clojure/<wbr><a href="http://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">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</a><wbr> <wbr><a href="http://clojure.main">clojure.main</a><wbr> -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/<wbr><a href="http://clojure-1.9.0.jar">clojure-1.9.0.jar</a><wbr>:/Users/alex/.m2/repository/org/clojure/<wbr><a href="http://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">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</a><wbr> <wbr><a href="http://clojure.main">clojure.main</a><wbr> -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/<wbr><a href="http://clojure-1.8.0.jar">clojure-1.8.0.jar</a><wbr> <wbr><a href="http://clojure.main">clojure.main</a><wbr> -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/<wbr><a href="http://clojure-1.8.0.jar">clojure-1.8.0.jar</a><wbr> <wbr><a href="http://clojure.main">clojure.main</a><wbr> -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/<wbr><a href="http://clojure-1.10.jar">clojure-1.10.jar</a><wbr> <wbr><a href="http://clojure.main">clojure.main</a><wbr> -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/<wbr><a href="http://clojure-1.10.jar">clojure-1.10.jar</a><wbr> <wbr><a href="http://clojure.main">clojure.main</a><wbr> -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/<wbr><a href="http://clojure-1.10.jar">clojure-1.10.jar</a><wbr> <wbr><a href="http://clojure.main">clojure.main</a><wbr> -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/<wbr><a href="http://clojure-1.10.jar">clojure-1.10.jar</a><wbr> <wbr><a href="http://clojure.main">clojure.main</a><wbr> -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>
<!--end of _originalContent --></div></body></html>