BetterThanTomorrow / calva

Clojure & ClojureScript Interactive Programming for VS Code
https://marketplace.visualstudio.com/items?itemName=betterthantomorrow.calva
Other
1.58k stars 212 forks source link

Slow start of the CLJS repl using shadow-cljs on Windows #512

Open dabrazhe opened 4 years ago

dabrazhe commented 4 years ago

This is measured on Windows 10, HP, i5 2.3 Ghz 8 GB RAM.

Using Shadow-cljs on a basic cljs project. Here are my measurements and notes from the work PC:

fetch metadata and extract:shadow-cljs => takes a little while
npx: installed 90 in 41.514s  => it's quite long, why should it install it every time?
[:app] Configuring build. => takes a while, not sure how
compiling the app => about 10-15 seconds

I am comparing Jack-in with Cursive, where I need to

Alles zusammen, it takes Cursive

Which is quite a difference when I am trying to use Calva, and cannot keep all apps open all the time.

bpringe commented 3 years ago

npx: installed 90 in 41.514s => it's quite long, why should it install it every time?

npx only temporarily installs the package and then removes it after use. This ensures the latest version is used each time it's run with npx. https://nodejs.dev/learn/the-npx-nodejs-package-runner#installation-less-command-execution

I think the reason it's faster in your Cursive example is because:

You could globally install the shadow-cljs cli, start the server yourself (no installation thereafter each time you start it), then run the Calva command to connect to it - "Connect to a running repl server in project..."