Fork me on GitHub
#cljs-dev
<
2020-05-21
>
roman01la07:05:02

@dnolen regarding lifting small data literals into constants, do we want to align with Clojure here, where data literals are cached per function or just put everything into constants table?

thheller08:05:53

It probably shouldn't do what clojure does for all "constants". a) that might interfere with DCE since Closure doesn't understand the CLJS datastructures very well sometimes and b) might affect overall startup performance since it would do quite a lot when the code is loaded

thheller08:05:50

also clojure inlines constants per ns, which may lead to lots of duplication

dnolen13:05:02

@thheller last I looked Closure did seem to understand ClojureScript constants where everything is static

dnolen13:05:04

that said the feature should be behind a flag that defaults to false so that folks who are familiar with tuning peformance can experiment and report back

dnolen13:05:13

w/o affecting typical users

dnolen13:05:22

@roman01la we should just reuse what have, the constants table approach was designed to aid DCE

dnolen13:05:33

flag probably should be called :optimize-constant-colls or something like that

dominicm20:05:49

Is it intentional that the webpack guide uses -v in all it's commands? The output is really loud for first run.

dominicm20:05:12

e.g. Reading analysis cache for jar:file:/home/overfl0w/.m2/repository/org/clojure/clojurescript/1.10.741/clojurescript-1.10.741.jar!/cljs/spec/alpha.cljs Compiling /home/overfl0w/.cljs/.aot_cache/1.10.741/35F2CCB/reagent/dom.cljs to /home/overfl0w/.cljs/.aot_cache/1.10.741/35F2CCB/reagent/dom.js Can't really see the prompt