Why is leiningen so slow when it starts?

前端 未结 5 1265
余生分开走
余生分开走 2021-02-13 14:34

I\'m using lein repl to execute clojure repl in console. When I run it, it takes over 15 seconds. When I run java -cp clojure-1.6.0.jar clo

5条回答
  •  天涯浪人
    2021-02-13 15:26

    Your first question has been answered, so regarding the second one I guess what you want is to decrease the booting time cause you usually load some namespaces that are being changed as you code. It's possible to reload code from a modified namespace without exiting the REPL with (use 'your.namespace :reload). This way you might boot just once and reload the updated namespaces

    user=> (doc require)
    

    ...

      :reload forces loading of all the identified libs even if they are already loaded
      :reload-all implies :reload and also forces loading of all libs that the identified libs directly or indirectly load via require or use
    

    ...

    In the other hand if you read the output of lein help repl you will see how setup a REPL server and client that might reduce your booting time

提交回复
热议问题