On Mon, 02 Oct 2017 12:00:36 +0100 Chris Lamb <la...@debian.org> wrote:
> There's no obvious reason at this point why this performance regression is > limited to Clojure, unless — hopefully — it's related to the .clj files? > > ie. this could be affecting the performance of all Java applications > in Debian (!) Hey having fun with a Java puzzle and not telling the Java Team? That's mean ;) I quickly investigated this, it looks like the .clj files bundled in clojure.jar are recompiled every time clojure is invoked if the jar was processed by strip-nondeterminism. My guess was that the .clj files are recompiled if the associated .class file is older, but it also happens if they have the same date. I eventually found this check performed in the load() method of RT.java: if((classURL != null && (cljURL == null || lastModified(classURL, classfile) > lastModified(cljURL, scriptfile))) Changing '>' with '>=' fixes the issue. Emmanuel Bourg