Skip to content

Commit 40d5652

Browse files
committed
compiler flag
1 parent c2ccaa9 commit 40d5652

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/news/2025-11-24-release.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ While ClojureScript enables writing ambitious programs for JavaScript targets, n
7777
7878
ClojureScript always produced a reasonably small artifact, usually starting at 20K compressed. And thanks to Google Closure Compiler tree-shaking, you could leverage powerful functionality from Google Closure Library and expect the size of your final artifact to increase slowly.
7979
80-
Still the hard 20K compressed wall remained. After some time in the hammock, we decided to travel all the way back to 2011 and bring back the original data structures that Rich Hickey and Think Relevance included in the standard library. While not as efficient, they are decoupled and involve less code. By tweaking the ClojureScript compiler to emit calls to the older constructors instead under a new `:lite-mode` flag, tree-shaking can eliminate the persistent implementations.
80+
Still the hard 20K compressed wall remained. After some time in the hammock, we decided to travel all the way back to 2011 and bring back the original data structures that Rich Hickey and Think Relevance included in the standard library. While not as efficient, they are decoupled and involve less code. By tweaking the ClojureScript compiler to emit calls to the older constructors instead under a new `:lite-mode` compiler flag, tree-shaking can eliminate the persistent implementations.
8181
82-
The other code size issue in ClojureScript programs is printing. While required to deliver the LISP experience at the REPL, for less ambitious artifacts the machinery is just dead weight. `:elide-to-string` removes the `toString` implementations for collections types improving tree-shaking.
82+
The other code size issue in ClojureScript programs is printing. While required to deliver the LISP experience at the REPL, for less ambitious artifacts the machinery is just dead weight. The `:elide-to-string` compiler flag removes the `toString` implementations for collections types improving tree-shaking.
8383
8484
Combining these two new experimental flags cuts the starting artifact size by two thirds. However, it's important to understand these flags cannot be used to make *large* ClojureScript programs smaller - once you have enough dependencies or rely on enough features, the savings provided by `:lite-mode` are a wash.
8585

0 commit comments

Comments
 (0)