Fork me on GitHub
#rewrite-clj
<
2019-11-02
>
sogaiu00:11:35

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.

lread01:11:41

@sogaiu that is interesting. I wonder, do you think anybody would be bothered by a 20mb increase?

lread01:11:54

why is that?

sogaiu01:11:57

especially for cmd line programs - if you look around a bit i think you'll find such emissions :)

sogaiu01:11:17

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 🙂

sogaiu01:11:24

in the mean time, here is a use case

sogaiu01:11:57

i use native image binaries for plugins and extensions (for atom and vscode) -- each one being bigger means longer download times

sogaiu01:11:09

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

sogaiu01:11:14

but may be it is unwarranted

sogaiu01:11:19

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

lread01:11:38

I might be macOS upgrade biased... I just updated to macOS 10.15.1 today and if I remember right, it was over 4gb. simple_smile

sogaiu01:11:10

well, it isn't exactly an analogous situation

lread01:11:32

no but it might have biased my thinking

sogaiu01:11:07

ok 🙂 how often would you say you update macos?

lread01:11:14

so your concern is currently download times of updates, right?

sogaiu01:11:43

it is one concern, yes, but i wouldn't say it's the only one

lread01:11:58

(ya I didn’t mean the bias was sound)

sogaiu01:11:10

how many sound biases have you met?

sogaiu02:11:31

for plugins and extensions, it gets worse because to do it well atm, you may need to bundle 3 diff binaries

sogaiu02:11:50

that's 3 native-image binaries per plugin / extension

sogaiu02:11:17

so each user has to unfortunately download unwanted bits

sogaiu02:11:43

if i'm the only one with this concern though, it shouldn't be a burden on anyone else

lread02:11:54

it’s not a concern I currently share with you, but I can certainly acknowlege it

sogaiu02:11:45

well, it's a very specific case, so no worries - if it's easy to do something about it, it would be nice :)

👍 4
borkdude08:11:08

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.

👍 4
borkdude08:11:12

20mb is twice the size of clj-kondo

borkdude13:11:27

sorry, incorrect: clj-kondo packs 15mb right now. the minimal size of a clj binary seems to be around 10mb

lread13:11:34

thanks for info!