drip
drip copied to clipboard
Drip does not seem to make startup faster
I'm trying to speed up leiningen
for the simplest commands, like lein help
, etc.
Everything seems to work as expected (the jvm seems to be re-used), however I'm getting no speed-up.
Should drip
speed up such things, or I'm mistaken? If that's the case, where can I expect a speed-up? Or maybe I've misconfigured something?
Thank you, by the way, drip seems really awesome.
% /Users/va1en0k/.leindrip/drip kill
% /Users/va1en0k/.leindrip/drip ps
% time lein test
lein test user
Testing user
Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
lein test 17.77s user 0.82s system 275% cpu 6.752 total
% time lein test
lein test user
Testing user
Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
lein test 0.10s user 0.10s system 3% cpu 6.159 total
% time lein test
lein test user
Testing user
Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
lein test 0.09s user 0.10s system 2% cpu 6.484 total
% /Users/va1en0k/.leindrip/drip ps
18119 org.flatland.drip.Main clojure.main /Users/va1en0k/.drip/0.2.3/9d4770502bd965e8930beaa651c7e0a428a98e2a/18097-1 -XX:+TieredCompilation -Xbootclasspath/a:/Users/va1en0k/.lein/self-installs/leiningen-2.0.0-standalone.jar -Dfile.encoding=UTF-8 -Dmaven.wagon.http.ssl.easy=false -Dleiningen.original.pwd=/Users/va1en0k/Mine/shegon -Dleiningen.script=/usr/local/bin/../Cellar/leiningen/2.0.0/bin/lein -Djava.awt.headless=true
It looks to me like this is speeding up lein test
. Am I missing something?
It's 6.752 seconds in the first run, 6.159 and 6.484 in the next runs. It's 4% speed-up, I hoped for huger gains. Maybe in other use cases it's huger? Please tell me what to expect :-)
I was looking at user time which went from 17.77s to 0.10s. I didn't notice that the system time was different.
What version of lein and drip are you using?
yeah, I've stared at these numbers too, at first, but it just not felt like 0.10s
:-)
% lein version
Leiningen 2.0.0 on Java 1.6.0_37 Java HotSpot(TM) 64-Bit Server VM
% /Users/va1en0k/.leindrip/drip version
drip version "0.2.3" standalone
lein
is installed from brew
, I believe. drip
is installed using lein-drip
(I've tried other methods before and it didn't work at all, either spawning a new vm each time or somehow bypassing drip).
I'm having the same problem. drip ps
shows a dozen VMs, but lein repl
starts as slow as ever.
I am running checkout versions of both pieces of software now, since people in #clojure said it might be that.
$ lein --version
Leiningen 2.1.0-SNAPSHOT on Java 1.6.0_37 Java HotSpot(TM) 64-Bit Server VM
$ drip version
drip version "0.2.3" checkout 2aab88b
The test test:
$ drip kill
$ time lein test
lein test unify-redis.core-test
Testing unify-redis.core-test
FAIL in (a-test) (core_test.clj:7)
FIXME, I fail.
expected: (= 0 1)
actual: (not (= 0 1))
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
Tests failed.
real 0m9.050s
user 0m13.151s
sys 0m0.669s
$ time lein test
lein test unify-redis.core-test
Testing unify-redis.core-test
FAIL in (a-test) (core_test.clj:7)
FIXME, I fail.
expected: (= 0 1)
actual: (not (= 0 1))
Ran 1 tests containing 1 assertions.
1 failures, 0 errors.
Tests failed.
real 0m8.608s
user 0m0.130s
sys 0m0.103s
Note that here user is significantly faster as well, but the actual time taken is the same.
Seeing the same thing here. Lein 2.0.0, Drip 0.2.3:
$ drip ps
$ time lein test
lein test user
Testing user
Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
3.36 real 10.36 user 0.49 sys
$ drip ps
10573 org.flatland.drip.Main clojure.main /Users/sjl/.drip/0.2.3/4ee3571c69fc8f77a9011c517476ee9cb542f855/10549-1 -XX:+TieredCompilation -Xbootclasspath/a:/Users/sjl/.lein/self-installs/leiningen-2.0.0-standalone.jar -Dfile.encoding=UTF-8 -Dmaven.wagon.http.ssl.easy=false -Dleiningen.original.pwd=/Users/sjl/src/if-then-like -Dleiningen.script=/Users/sjl/lib/dotfiles/bin/lein -Djava.awt.headless=true
$ time lein test
lein test user
Testing user
Ran 0 tests containing 0 assertions.
0 failures, 0 errors.
3.10 real 0.06 user 0.06 sys
The same here. Using Drip 0.2.3. No speed boost noticed with Leiningen 2.0.0, so updated to 2.1.3 and it's the same:
noice:~/code/clojure/driptest [master] % drip kill
noice:~/code/clojure/driptest [master] % drip ps
noice:~/code/clojure/driptest [master] % time lein lobos migrate
WARNING: get already refers to: #'clojure.core/get in namespace: dita.lib.config, being replaced by: #'dita.lib.config/get
lein lobos migrate 9.67s user 0.64s system 100% cpu 10.267 total
noice:~/code/clojure/driptest [master] % drip ps
85345 org.flatland.drip.Main clojure.main /Users/noice/.drip/0.2.3/455546fef55a394538dbcf8d785bdbbd0b7675ee/85316-1 -Xbootclasspath/a:/Users/noice/.lein/self-installs/leiningen-2.1.3-standalone.jar -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Dfile.encoding=UTF-8 -Dmaven.wagon.http.ssl.easy=false -Dleiningen.original.pwd=/Users/noice/code/clojure/driptest -Dleiningen.script=/Users/noice/local/bin/lein -Djava.awt.headless=true
noice:~/code/clojure/driptest [master] % time lein lobos migrate
WARNING: get already refers to: #'clojure.core/get in namespace: dita.lib.config, being replaced by: #'dita.lib.config/get
lein lobos migrate 0.10s user 0.13s system 2% cpu 9.538 total
noice:~/code/clojure/driptest [master] % time lein lobos migrate
WARNING: get already refers to: #'clojure.core/get in namespace: dita.lib.config, being replaced by: #'dita.lib.config/get
lein lobos migrate 0.10s user 0.14s system 2% cpu 10.169 total
noice:~/code/clojure/driptest [master] % drip ps
85927 org.flatland.drip.Main clojure.main /Users/noice/.drip/0.2.3/455546fef55a394538dbcf8d785bdbbd0b7675ee/85905-1 -Xbootclasspath/a:/Users/noice/.lein/self-installs/leiningen-2.1.3-standalone.jar -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Dfile.encoding=UTF-8 -Dmaven.wagon.http.ssl.easy=false -Dleiningen.original.pwd=/Users/noice/code/clojure/1188_dita_web -Dleiningen.script=/Users/noice/local/bin/lein -Djava.awt.headless=true
noice:~/code/clojure/driptest [master] % drip version
drip version "0.2.3" standalone
noice:~/code/clojure/driptest [master] % lein version
Leiningen 2.1.3 on Java 1.6.0_45 Java HotSpot(TM) 64-Bit Server VM
Also, don't know if it's related, but during the lein lobos migrate
, another thing spawns in drip ps
and it disappears when the lein quits. (Forked child maybe?)
I also didn't feel significant speed improvements. More relevant metrics below.
I ran lein drip
and lein help
both in the project directory.
lein help
times:
without drip - 8.71 real 8.65 user 0.51 sys
with drip - 7.86 real 0.06 user 0.13 sys
Checking if the drip process is running:
> ps aux |grep drip
clojure 81739 0.0 1.9 2856740 40060 ?? Ss 10:32PM 0:01.28 /usr/bin/java -client -Xbootclasspath/a:/Users/clojure/.lein/self-installs/leiningen-2.1.3-standalone.jar -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Dfile.encoding=UTF-8 -Dmaven.wagon.http.ssl.easy=false -Dleiningen.original.pwd=/Volumes/clojure/reusle -Dleiningen.script=/opt/local/bin/lein2 -Djava.awt.headless=true -classpath /Users/clojure/.m2/repository/org/flatland/drip/0.2.3/drip-0.2.3.jar::/Users/clojure/.lein/self-installs/leiningen-2.1.3-standalone.jar org.flatland.drip.Main clojure.main /Users/clojure/.drip/0.2.3/10f4a0c02d135901466bec4c84de38255f3d1a7a/81717-1
clojure 81738 0.0 0.0 2434832 176 s000 S 10:32PM 0:00.00 /Users/clojure/.drip/0.2.3/drip_daemon /usr/bin/java -client -Xbootclasspath/a:/Users/clojure/.lein/self-installs/leiningen-2.1.3-standalone.jar -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Dfile.encoding=UTF-8 -Dmaven.wagon.http.ssl.easy=false -Dleiningen.original.pwd=/Volumes/clojure/reusle -Dleiningen.script=/opt/local/bin/lein2 -Djava.awt.headless=true -classpath /Users/clojure/.m2/repository/org/flatland/drip/0.2.3/drip-0.2.3.jar::/Users/clojure/.lein/self-installs/leiningen-2.1.3-standalone.jar org.flatland.drip.Main clojure.main /Users/clojure/.drip/0.2.3/10f4a0c02d135901466bec4c84de38255f3d1a7a/81717-1
and:
> lein drip
Detected platform-type: Unix
Lein-drip folder found.
drip-executable found.
drip already registered as Lein's JVM.
I'm using: Leiningen 2.1.3 on Java 1.6.0_43 Java HotSpot(TM) 64-Bit Server VM drip version "0.2.3" standalone
Same issue here, lein 2.2.0 and drip 0.2.3
Same here Leiningen 2.2.0 on Java 1.7.0_40 OpenJDK 64-Bit Server VM
See https://github.com/technomancy/leiningen/pull/1401 Unfortunately, no release contains that patch yet.