I got a Rasperry Pi 512 MB version (late 2012) and installed the Developer Preview of Java SE 8 for ARM on it. When I create a new Clojure project with Leiningen and launch the nREPL by doing lein repl
it takes a bit more than two minutes (roughly 130 - 140 seconds) until the REPL has been initialized and can be used.
When launching the JAR file directly java -jar clojure-1.4.0/clojure-1.4.0
the REPL starts up in 25s.
I'm using fast class 10 SD cards (SanDisk Extreme with up to 30 MB/s). How come that the difference between using Leiningen with nRepl vs launching the JAR file is so big? What could be done to improve the startup time with Leiningen for the Raspberry Pi?
lein repl
checks dependencies, builds the project and prepares auto completion and other shenanigans like that. You could try to do clever things like keeping a JVM with Clojure loaded to run leiningen on around, but I'm not sure how much that would actually reduce the startup time. I suppose ideally, you should just try to not runlein repl
very often. – Campmansudo apt-get install clisp
. – Butchery