cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
2020-05-21T07:24:02.231300Z

@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?

thheller 2020-05-21T08:04:53.233Z

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

thheller 2020-05-21T08:05:50.233900Z

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

dnolen 2020-05-21T13:40:02.234600Z

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

dnolen 2020-05-21T13:41:04.235800Z

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

dnolen 2020-05-21T13:41:13.236Z

w/o affecting typical users

dnolen 2020-05-21T13:42:22.236800Z

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

dnolen 2020-05-21T13:43:33.237500Z

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

dominicm 2020-05-21T20:13:49.237600Z

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

dominicm 2020-05-21T20:14:12.237700Z

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