See if it's faster to re-use the Closure Compiler instance

Issue #2 new
Marcin Szczepanski created an issue

Currently each minification creates a new Compiler, since you can pass CompilerOptions to the compile method there doesn't appear to be any reason to do this.

In additional CompilerOptions has a clone method, so we could also have base options that are set and overridden only if required.

Not sure if this will actually improve performance (depends on whether constructing a new compiler actually has much overhead, or if all the work is in the compile method) but it's worth a shot.

Comments (0)

  1. Log in to comment