Fork me on GitHub
#lumo
<
2021-08-01
>
borkdude10:08:51

Several years ago I heard a podcast with Antonio where he explained lumo uses some kind of image-based solution for faster startup time. But when I run lumo -e '(+ 1 2 3)' the startup time is within the 300ms ballpark. This is not a problem for me, but I was just curious how to activate that image-based solution. Do I have to install some special version of lumo, or did it never reach a release?

djblue05:08:12

I think this is already part of lumo. It uses a custom version of nexe that allows supplying a v8 snapshot https://github.com/anmonteiro/nexe/commit/6a52ab861d4986d8c23e2ade4f757542ccc63943.

djblue05:08:49

I think without v8 snapshots, loading all the compiled js code for cljs.core would take a bit longer

borkdude10:08:19

what do I have to do to get this custom snapshot installed?

djblue15:08:47

This should already be part of the lumo binary you get via npm

borkdude15:08:32

when I tested it the startup wasn't that great though, around 300ms on a spec-ed out MPB 2019

borkdude15:08:00

npm upgrade -g lumo-cljs
$ time lumo -e '(+ 1 2 3)'
6
lumo -e '(+ 1 2 3)'   0.28s  user 0.04s system 122% cpu 0.262 total

borkdude10:08:55

Context: I'm creating a babashka-like tool for nodeJS: https://github.com/borkdude/nbb (see #nbb). It's not using self-hosted, but is based in SCI, so it's obviously different, but trying to learn more about this ecosystem, since I'm pretty much a nodeJS n00b.