Fork me on GitHub
#graalvm
<
2021-03-03
>
Alys Brooks03:03:04

I believe it's /path/to/graal/Contents/Home/bin/gu

👍 3
borkdude12:03:53

@katox merged, thanks

borkdude12:03:12

now for your babashka compilation problem: have you solved this too?

katox12:03:31

no, let's move to a proper forum .)

borkdude12:03:39

we can do in private.

katox12:03:33

for the record, the error was cloning the repo without --recursive, thanks!

borkdude16:03:43

I think all the ingredients for an all native deps.edn / tools.deps CLI are there now: https://github.com/borkdude/tools-deps-native-experiment/tree/shell#shell-branch This + deps.clj = no JVM for dep resolution / downloading, just JVM for REPL / running of apps / bytecode AOT compilation

borkdude16:03:36

Will wait a bit for the shell approach to appear properly in tools.deps.alpha.

borkdude16:03:59

What do we win with this? Maybe a bit questionable to go through these hoops, but: - startup time for downloading deps - running this is about as fast with caching of the CLI as it is without, if the deps are already there - could be used in babashka to decouple downloading of scripting deps from a JVM

ghadi16:03:23

what percentage of execution time is startup vs. downloading deps?

borkdude16:03:49

it depends on how many deps you have

borkdude16:03:58

and how fast your network is

Alex Miller (Clojure team)16:03:23

and how much is in your cache :)

borkdude16:03:34

I will do a small test locally with only medley

borkdude16:03:43

300ms vs 3000ms

borkdude16:03:54

(with medley and .cpcache removed from local caches)

borkdude17:03:23

The comparison wasn't entirely fair because I ran clojure in my tools-deps-native project which had more deps so calculating the classpath would take more time. Better comparison:

$ time ./tools-deps-native '{:deps {medley/medley {:mvn/version "1.3.0"}}}'
Downloading: medley/medley/1.3.0/medley-1.3.0.pom from clojars
Downloading: medley/medley/1.3.0/medley-1.3.0.jar from clojars
"/Users/borkdude/.m2/repository/medley/medley/1.3.0/medley-1.3.0.jar:/Users/borkdude/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar:/Users/borkdude/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar:/Users/borkdude/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar"
./tools-deps-native '{:deps {medley/medley {:mvn/version "1.3.0"}}}'   0.05s  user 0.03s system 27% cpu 0.300 total
$ (cd /tmp; time clojure -Spath -Sdeps '{:deps {medley/medley {:mvn/version "1.3.0"}}}')
Downloading: medley/medley/1.3.0/medley-1.3.0.pom from clojars
Downloading: medley/medley/1.3.0/medley-1.3.0.jar from clojars
src:/Users/borkdude/.m2/repository/medley/medley/1.3.0/medley-1.3.0.jar:/Users/borkdude/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar:/Users/borkdude/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar:/Users/borkdude/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar
clojure -Spath -Sdeps '{:deps {medley/medley {:mvn/version "1.3.0"}}}'   7.88s  user 0.40s system 336% cpu 2.464 total

borkdude23:03:38

Update regarding tools-deps-native. The GraalVM problems have now vanished due to getting rid of Jsch.

borkdude23:03:20

The startup time + downloading medley with clojure at 1.10.2.801 (which doesn't use JSch anymore) also seems to have improved a little, now down to 2s compared to 2.5s above