Hi Alex,

    A couple of months ago I did an investigation on the slow boot time of 
`lein repl`. As you said, a lot of time (around 30% time on my computer) 
are spent on the features like completion. Also, I notice that there is a 
parsing library called `sjacket ` at https://github.com/cgrand/sjacket , 
which provides the functionality to generating the parsing tree on the fly. 
Unfortunately it seems that the parser itself is constructed every time 
during the startup time, although the parser itself is always the same 
every time. My idea the thoughts are put at 
https://github.com/cgrand/sjacket/issues/24 , and I guess it would be 
interesting to let somebody who is concerned to notice.


在 2016年2月11日星期四 UTC-5下午4:47:34,Alex Miller写道:
>
> Nice! I have some stuff similar to this I use, but this is nicely packaged.
>
> On Thu, Feb 11, 2016 at 2:30 PM, Ryan Fowler <ryan....@singlewire.com 
> <javascript:>> wrote:
>
>> On Tue, Feb 9, 2016 at 12:36 PM, Alex Miller <al...@puredanger.com 
>> <javascript:>> 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