Fork me on GitHub
#planck
<
2016-09-25
>
mnewhook12:09:17

(ns foo.bar
  (:require
   [planck.core :refer [line-seq *command-line-args*]]
   []
   [cljs-time.coerce :as t]
   [cljs-time.format :as tf]
   [cljs-time.core :as time]))

$ time planck -c/Users/matthew/.m2/repository/com/andrewmcveigh/cljs-time/0.4.0/cljs-time-0.4.0.jar test.cljs
planck  test.cljs  6.96s user 0.27s system 134% cpu 5.355 total
That takes ~7s on my macbook pro.

mfikes13:09:24

@mnewhook Interested in what happens if you add -K or -k <path> and run it twice (once to create cache and again to use it)

mnewhook13:09:55

ah, you have to use -K each time?

mnewhook13:09:20

I had already tried the cache but I didn鈥檛 realize you had to use -K to actually use the cache 馃檪

mnewhook13:09:22

1s with the cache

mnewhook13:09:28

much more reasonable.

mfikes13:09:32

Cool, yes. Cache has always been an opt-in feature for Planck, for better or worse.

mnewhook13:09:55

it would be nice if it used the cache automatically if it is there.

mfikes13:09:26

Yeah, there are probably some imrovements to make caching more implicit

anmonteiro13:09:15

FWIW I like that cache is opt-in, as it could swallow e.g. undeclared var errors when using Planck aggressively at development time

mfikes13:09:54

Good point

anmonteiro13:09:31

so it definitely depends on the use case. So far it doesn鈥檛 bother me to specify -K or -`k`whenever I want it to use caching

anmonteiro13:09:03

e.g.: planck -Kc <classpath goes here> is not troublesome at all!

anmonteiro13:09:33

@mfikes could #293 be related to a corrupted cache?

mfikes13:09:06

Yeah, perhaps the exit botches it

anmonteiro13:09:44

I think there was a fix in the CLJS compiler for that

anmonteiro13:09:48

on the JVM side, ofc

mfikes13:09:03

Oh, perhaps it is no longer reproducible then 馃檪

mnewhook13:09:03

perhaps it could be more obvious in the documentation that -K is also necessary to use the cache. > The first time you run Planck this way, it will save the results of compilation into .planck_cache. Then subsequent executions will use the cached results instead. Perhaps instead: The first time you run Planck this way, it will save the results of compilation into .planck_cache. Then subsequent executions with -K will use the cached results instead.

mfikes13:09:04

@mnewhook Yes, the documentation can definitely be fixed. 馃檪

mfikes13:09:28

I agree it can be interpreted to just use it if it exists 馃檪