Buck Golemon writes:

> I take this to mean that there's no widely accepted solution.

The widely-accepted solution is to leave a single process running. It
certainly has limitations, but it's the way most people deal with the
problem.

> Really, I just want `lein run` to be faster. Can someone explain where all 
> this time is spent?

Basically it comes from having to load two JVMs, one for Leiningen
itself and one for the project. Leiningen itself is fairly optimized for
this (fully AOTed, bytecode verification is turned off, fancy warm-up
JIT techniques disabled) which is why it's possible to get `lein
version` to return in under a second in some cases. But there are
various compatibility issues that prevent us from being able to perform
the same optimizations on project JVMs. These are documented on the
"Faster" page of the Leiningen wiki, and you can do some testing to
determine whether or not they affect your project in particular; if not
then they should provide a good boost.

But nothing will ever come close to the speed of keeping the JVM
resident, which is why I'm working on `:eval-in :nrepl` and lein.el. For
people who don't use Emacs, Jark is the only tool I'm aware of that is
working towards this in a way that's decoupled from the editor. They
could probably use some help both testing and implementing it.

> I hear a lot of talk of compiling, but why would we re-compile things where 
> none of the dependencies have changed?

Performing a full AOT of all your dependencies will help if you have a
large project with lots of dependencies that get loaded at application
boot. But that effect would be something along the lines of bringing
boot down from 20s to 12s rather than bringing it from 5s to <1s.

-Phil

-- 
-- 
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/groups/opt_out.


Reply via email to