[Pkg-javascript-commits] [uglifyjs] 185/190: Change the default sequences limit to 200 to speed up compress.

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Aug 7 23:17:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to annotated tag upstream/2.7.0
in repository uglifyjs.

commit b40d5de69c61688dad8e9f5c1e99558e0e3bdc30
Author: kzc <zaxxon2011 at gmail.com>
Date:   Thu Jun 30 14:56:12 2016 -0400

    Change the default sequences limit to 200 to speed up compress.
    
    Has little or no impact on minification size in the majority of
    cases but can speed up rollup builds significantly.
    
    This sequences change also has the beneficial side effect of avoiding
    "stack size exceeded" errors on very large input files.
    
    The user is free to alter the sequences limit if they are so inclined.
    The previous sequences limit was 2000. 20 is often sufficient.
---
 README.md       | 2 +-
 lib/compress.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 287c481..ca1c8e4 100644
--- a/README.md
+++ b/README.md
@@ -294,7 +294,7 @@ to set `true`; it's effectively a shortcut for `foo=true`).
 - `sequences` (default: true) -- join consecutive simple statements using the
   comma operator.  May be set to a positive integer to specify the maximum number
   of consecutive comma sequences that will be generated. If this option is set to
-  `true` then the default sequences limit is `2000`. Set option to `false` or `0`
+  `true` then the default sequences limit is `200`. Set option to `false` or `0`
   to disable. On rare occasions the default sequences limit leads to very slow
   compress times in which case a value of `20` or less is recommended.
 
diff --git a/lib/compress.js b/lib/compress.js
index 6a534c3..f0f3d09 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -80,7 +80,7 @@ function Compressor(options, false_by_default) {
         passes        : 1,
     }, true);
     var sequences = this.options["sequences"];
-    this.sequences_limit = sequences == 1 ? 2000 : sequences | 0;
+    this.sequences_limit = sequences == 1 ? 200 : sequences | 0;
     this.warnings_produced = {};
 };
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git



More information about the Pkg-javascript-commits mailing list