This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-02
Channels
- # announcements (21)
- # babashka (1)
- # beginners (67)
- # calva (18)
- # cider (21)
- # clj-kondo (109)
- # cljs-dev (3)
- # clojure (129)
- # clojure-spec (15)
- # clojure-uk (30)
- # clojurescript (3)
- # datomic (2)
- # graalvm (8)
- # graphql (1)
- # juxt (1)
- # malli (28)
- # off-topic (46)
- # reitit (5)
- # rewrite-clj (33)
- # ring-swagger (2)
- # shadow-cljs (199)
- # vim (9)
i hope we can figure out some way to reduce the size of native-images built with the rewrite-cljc -- iirc, there was a more than 20 MB increase. i wonder if native-image has some kind of tree-shaking or there's some nice way to exclude the cljs stuff for clj native-image builds.
@sogaiu that is interesting. I wonder, do you think anybody would be bothered by a 20mb increase?
especially for cmd line programs - if you look around a bit i think you'll find such emissions :)
well, i can give you a concrete situation off the top of my head, but i don't have a good summary atm -- if i think of a good summary i will report 🙂
i use native image binaries for plugins and extensions (for atom and vscode) -- each one being bigger means longer download times
perhaps it is premature to be concerned -- it's just something i've been considering for some time and i've noticed other people being concerned about size
it could be that native-image will get tree shaking if it doesn't have it already, so may be time will take care of the issue too
I might be macOS upgrade biased... I just updated to macOS 10.15.1 today and if I remember right, it was over 4gb.
just to show i'm not the only odd ball: https://github.com/johnthagen/min-sized-rust https://blog.filippo.io/shrink-your-go-binaries-with-this-one-weird-trick/
for plugins and extensions, it gets worse because to do it well atm, you may need to bundle 3 diff binaries
well, it's a very specific case, so no worries - if it's easy to do something about it, it would be nice :)
FWIW if rewrite-cljc stays close to the implementation of rewrite-clj there should be no difference in binary size: the CLJS branches are ignored during read time.