Maybe this experiment could interest you (clojurescript as a plugin of
gnome):
https://github.com/technomancy/lein-gnome

In general, if AFAIK the main performance issue is the jvm startup time and
the loading of the clojure.core library, one first solution could be
keeping a single background repl process active, which could run in
separated threads every shell script feed to it via a tcp socket. Every
thread should live in a isolated sandbox in order to keep clean the overall
environment.

On Sunday, May 20, 2012, Edward Ruggeri wrote:

> Hey everyone!,
>
> I know this is an old story.
>
> I've played with clojure, but the main thing that has kept me from
> never looking back is the startup speed.  "Hello world!" in Java takes
> me .303s, but just "java -cp clojure-1.5.0-master-SNAPSHOT.jar" takes
> 1.989s (sending C-d to close the repl even before it starts).
> Searching around here, I've found -XX:+TieredCompilation knocks me
> down to 1.581s and also
> -Xbootclasspath/a:clojure-1.5.0-master-SNAPSHOT.jar all the way to
> 0.938s.
>
> Incidentally, the same tricks with "Hello World" take me to 0.159s.
>
> Those were major improvements with very little cost; a huge win
> (thanks clojure list!).  Any further easy tips and tricks?  I'd like
> to get to the point where shell scripts aren't painful.  It looks like
> other major hints are nailgun, and never restarting the repl during
> development.
>
> I took the liberty of printing some System.getCurrentMillis from
> clojure.main.  It looks like it takes me 0.666s to enter the
> clojure.main main method, which I didn't entirely expect.  There are
> several static members of clojure.main that need to be initialized,
> these members take ~.520s to initialize in total; almost all of this
> is initializing `Var REQUIRE`.  Presumably this is when most of the
> clojure environment starts to get loaded?
>
> I'm just starting to look into clojure's jvm implementation; does
> anyone have some pointers on how to get quickly up to speed with the
> internals of clojure?
>
> Thanks!,
>
> -- Ned Ruggeri
>
> --
> 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<javascript:;>
> 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 <javascript:;>
> 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 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

Reply via email to