Fork me on GitHub
Ryan Jerue13:07:07

Does anyone have/know of a repo that has reagent ssr on graalvm? The only thing I see is, but it uses a fork of cljs


Is code splitting supposed to work on nodeJS + simple or advanced?

Karol Wójcik18:07:10

Code splitting for nodejs? Why?


see #shadow-cljs for more context


basically to save startup time for deps you don't need

Karol Wójcik18:07:32

Ah I see! tbd seems like a cool project. Would be very useful to put it on test in AWS Lambda environment!

Karol Wójcik18:07:33

I don’t yet understand your corespondence with Thomas, since you don’t need code splitting. Nodejs is interpreted, so not loaded libs will not affect startup time. Will read it once again


The point is that when I make a library and expose 10 sub-libraries as one file, that whole file must be loaded


but if I split it into 10 files and 9 of those files can be optionally loaded, then this saves startup time

👍 3
Karol Wójcik18:07:43

Oh you mean Clojurescript namespaces?


Unlike clojure, the file size for nodejs is negligible. Nothing happens on runetime. The startup speed is equal to the speed of reading from the hard disk plus interpreting the program itself. "Dead" code is irrelevant.


@U0BBFDED7 reading files takes time. so does interpreting them. I'm not talking about dead code, I'm talking about conditional dependencies


e.g. when you js/require some code, I don't buy that this is "for free", this always takes some time. it's about minimizing that time.


Dead code, that may be an unfortunate term. I meant that code that is not interpreted costs nothing more than disk read time


Anyway, from what I see on the #shadow-cljs channel, thheller mentioned that the difference probably will be insignificant


I've done some preliminary tests and the difference in startup time are very significant. Even the difference between optimizations simple and advanced are very noticable, let alone when you stuff dozens of extra libraries in there.

Rupert (All Street)19:07:58

We regularly use UIX in projects that we want to use/leverage the very large react ecosystem. You could probably get the tab example working in minutes with UIX.

Ben Hammond20:07:16

thats good to hear. I'll give it another shot then

Richard Bowen21:07:39

Hey, what would be the best way to create custom SvgIcon components based on some svg files?