This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-28
Channels
- # babashka (29)
- # beginners (179)
- # bristol-clojurians (1)
- # calva (9)
- # chlorine-clover (47)
- # cider (57)
- # clj-kondo (1)
- # cljs-dev (13)
- # clojure (241)
- # clojure-europe (9)
- # clojure-nl (4)
- # clojure-norway (88)
- # clojure-spec (4)
- # clojure-uk (15)
- # clojurescript (211)
- # clojutre (1)
- # community-development (8)
- # core-async (1)
- # datomic (31)
- # figwheel-main (33)
- # fulcro (29)
- # ghostwheel (6)
- # graalvm (11)
- # graphql (12)
- # instaparse (4)
- # jobs (1)
- # jobs-discuss (17)
- # leiningen (7)
- # malli (6)
- # meander (38)
- # off-topic (208)
- # onyx (6)
- # re-frame (23)
- # reagent (8)
- # shadow-cljs (61)
- # spacemacs (10)
- # sql (5)
- # yada (5)
@borkdude if there is a concern regarding binary size, I just run upx
on the bb
binary (on Mac) and it's quite successful:
File size Ratio Format Name
-------------------- ------ ----------- -----------
61167248 -> 19255312 31.48% macho/amd64 bb
ᐅ time ./bb --version
babashka v0.0.99
./bb --version 0.24s user 0.03s system 97% cpu 0.282 total
Try installing a tool called multitime, then you can run it multiple times and it will report the average. What is the original startup time though?
it would only work, if scripts were attached to the binary in form of overlay (append-at-the-end)
multitime output, 30 runs:
===> multitime results
1: ./bb --version
Mean Std.Dev. Min Median Max
real 0.272 0.008 0.258 0.275 0.282
user 0.234 0.007 0.222 0.237 0.243
sys 0.032 0.002 0.028 0.032 0.036
yeah, and I believe Catalina and sip and linking don't help much. Usually UPX is pretty fast.
let me try it on my machine then. you might be a "victim" of notarization checks. do you have LittleSnitch?
About the same on mojave:
$ time bb-upx -e 'nil'
bb-upx -e 'nil' 0.21s user 0.03s system 97% cpu 0.240 total
Although I'd like to keep it as small as possible while also preversing startup time
btw, decided to use babashka to generate a .circleci/config.yml instead of manually writing it, since I needed to repeat the same jobs with just one environment variable difference: https://github.com/babashka/babashka-sql-pods/blob/36b890fee3628d77ea1b16e15142112c2dfdd1c0/script/generate_circleci.clj