Fork me on GitHub
#clojure-dev
<
2018-11-11
>
gfredericks00:11:17

here: https://github.com/clojure/clojure/blob/a1722cf9a15d917ee78a117732cf5c5e01fe3557/src/jvm/clojure/lang/Compiler.java#L7138 though I just found out I may have misanalyzed under what circumstances this code gets used

andy.fingerhut00:11:32

yeah, a debug print in your own copy of Clojure and running a REPL would probably help

gfredericks01:11:23

just compiling clojure causes that line to run 6575 times

gfredericks01:11:38

doing (require 'foo) when src/foo.clj is a namespace with two or three functions causes the line to run about a hundred times

plexus01:11:50

I have noticed before that, at least under nREPL, every time you eval a form the chain of classloaders has gotten one extra classloader attached to it. (by chain I mean following the parent links)

plexus01:11:52

Each time you eval this the number goes up.

(->> (.getContextClassLoader (Thread/currentThread))
     (iterate #(.getParent %))
     (take-while boolean)
     count)

andy.fingerhut03:11:11

@gfredericks Are you using the "vanilla" Clojure REPL there? I guess you probably already realize that Leiningen and other things can insert more code in the 'stack'

mfikes17:11:11

Clojure 1.10.0-beta5 passes with Coal Mine (https://github.com/mfikes/coal-mine)

mfikes18:11:38

I also timed Coal Mine to see if perf changed; looks like perf is roughly the same: 1.9.0:

real	54m14.048s
user	57m43.328s
sys	0m22.639s
1.10.0-beta-5
real	56m59.032s
user	59m52.212s
sys	0m24.667s