lumo

borkdude 2021-08-01T10:19:51.001500Z

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?

borkdude 2021-08-02T10:01:19.003300Z

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

djblue 2021-08-02T15:18:47.003500Z

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

borkdude 2021-08-02T15:19:32.003700Z

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

borkdude 2021-08-02T15:28:00.003900Z

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

djblue 2021-08-02T05:51:12.002900Z

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.

djblue 2021-08-02T05:52:49.003100Z

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

borkdude 2021-08-01T10:20:55.002500Z

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.