Fork me on GitHub
#clojurescript
<
2021-07-28
>
Ryan Jerue13:07:07

Does anyone have/know of a repo that has reagent ssr on graalvm? The only thing I see is https://nextjournal.com/kommen/react-server-side-rendering-with-graalvm-for-clojure, but it uses a fork of cljs

borkdude14:07:18

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

Karol Wójcik18:07:10

Code splitting for nodejs? Why?

borkdude18:07:53

see #shadow-cljs for more context

borkdude18:07:01

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

borkdude18:07:11

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

borkdude18:07:28

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?

ribelo22:07:01

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.

borkdude22:07:02

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

borkdude22:07:21

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.

ribelo22:07:47

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

ribelo22:07:28

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

borkdude22:07:18

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?