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.
This commit is contained in:
kzc
2016-06-30 14:56:12 -04:00
committed by Richard van Velzen
parent b7ef7840f3
commit b40d5de69c
2 changed files with 2 additions and 2 deletions

View File

@@ -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 = {};
};