On Tue, Feb 9, 2016 at 12:36 PM, Alex Miller <a...@puredanger.com> wrote:

> I'm doing some research on slow Clojure boot time and would be interested
> in collecting info about example use cases where it's been a problem for
> people.
>

​The following snippet helps me visualize load times. It might be helpful
to others.​ The output is a bit long, so I just added the code and
usage/output in a gist at https://gist.github.com/ryfow/4283b64b4dd205d610e8

​​(def ^:dynamic *indent* 0)
(alter-var-root
 #'clojure.core/load
 (fn [orig]
   (fn [& paths]
     (let [t (System/nanoTime)
           r (binding [*indent* (inc *indent*)]
               (apply orig paths))]
       (binding [*out* *err*]
         (println (apply str (repeat *indent* " ")) (/ (- (System/nanoTime)
t) 1000000.0)  paths)
         (flush))
       r))))

;; Require namespace in question here
(require 'clojure.core.async)

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to