plumatic / plumbing

Prismatic's Clojure(Script) utility belt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

:advanced optimizations not removing dead code from Plumbing lib

SamHowie opened this issue · comments

I am experiencing an issue where the closure compiler is not eliminating dead code from plumbing.

I have created a simple example of the issue described: https://gist.github.com/SamHowie/aaf8f6b616bb59528ab8

Output file size when requiring plumbing - 145KB
Output file size when manually copy pasting used plumbing functions - 61KB

I am unsure if this is:

  1. a project.clj config error on my part
  2. a closure compiler issue
  3. a cljsbuild issue
  4. a plumbing issue

Has anyone else experienced this?

@SamHowie did you get to the bottom of this?

@atroche Not conclusively.

I arrived at the opinion that is was a clojurescript build issue. From what I read, the Closure Compiler allows one to compile code with multiple entry points. My theory is that the dependent libraries are being used as entry points during compilation.

However, I have not invested enough energy in digging through cljsbuild or the clojurescript compiler to verify this.

It might be interesting to bypass cljsbuild and see if the clojurescript compiler can be configured to optimize as expected.