OK, so I’ve enabled AOT cache with
:aot-cache true in the compiler options. I also wiped the ~/.cljs/.aot_cache directory just in case.
I experience the same phenomenon: The initial compile takes
40 seconds, the first recompile takes 6-8 minutes, the subsequent recompiles takes 6 seconds.
I’m on Clojurescript 1.10.844, by the way. I’ve tried downgrading to 1.10.764, but the problem persisted.
I wish I knew how to get more insight in what the computer is doing during those 6-8 minutes. It seems to be mostly waiting, since there is hardly any CPU activity. I’ve rebooted it, and there’s not much else going on.
Just tried one more thing: I copied the config to a foo.cljs.edn file and ran
lein fig -- --build foo --repl (ie. not using
figwheel.main.api). It showed the same phenomenon of around 6 minutes recompile time after the first file change.