Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Speed Up lein Uberjar Build

I have a Clojure "main" application that depends on several Clojure libraries, two of which are mine. The compile phase, whether just compiling or running uberjar takes a long time. It's on the order of at least one minute or more. Neither of my libraries nor main are very large.

My libraries' and main project.clj files contain

  :aot [bene-cmp.core]
  :omit-source true

directives.

What can I do, if anything, to speed up the build process?

Here are the three project.clj files. project.clj main

;$Log$
;
(defproject bene-cmp "1.0.0-SNAPSHOT"
  :description "This is the main benetrak/GIC comparison program."
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [org.clojure/tools.cli "0.1.0"]
                 [clojure-csv/clojure-csv "1.2.4"]
                 [seesaw "1.4.0"]
                 [bene-csv "1.0.0-SNAPSHOT"]
                 [util "1.0.0-SNAPSHOT"]]
  :aot [bene-cmp.core]
  :omit-source true
  :main bene-cmp.core)

project.clj library 1

(defproject util "1.0.0-SNAPSHOT"
    ;$Log: project.clj,v $
    ;Revision 1.3  2012/04/04 18:24:36  cvsuser
    ;Take II on comments. (comment ) does not work.
    ;
    ;Revision 1.2  2012/04/04 18:20:54  cvsuser
    ;New library for Clojure. Add CVS comments.

  :description "A general purposes Clojure library"
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [org.clojure/tools.cli "0.1.0"]]
  :aot [util.core]
  :omit-source true)

project.clj library 2

(defproject bene-csv "1.0.0-SNAPSHOT"
  ;$Log: project.clj,v $
  ;Revision 1.2  2012/04/05 22:50:24  cvsuser
  ;Update and add cvs logging.
  ;
  :description "A csv parsing library"
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [clojure-csv/clojure-csv "1.3.2"]
                 [util "1.0.0-SNAPSHOT"]]
  :aot [bene-csv.core]
  :omit-source true)
like image 489
octopusgrabbus Avatar asked Apr 09 '12 19:04

octopusgrabbus


1 Answers

setup jvm option -Xmx to 2G or above.

like image 96
number23_cn Avatar answered Oct 22 '22 11:10

number23_cn