diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-21 11:49:10 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-08-21 11:49:10 -0700 |
commit | 5b5e5865346790df93789078d9adc95696b00b47 (patch) | |
tree | 79131334bcf12f2b6bafb56911c4943d4349d09b | |
parent | bd05b4d4f8c805c45630977547b0b01c04b1ce18 (diff) |
warn on very large functions and mention OUTLINING_LIMIT
-rw-r--r-- | tools/js_optimizer.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/js_optimizer.py b/tools/js_optimizer.py index acb87460..5d7dc562 100644 --- a/tools/js_optimizer.py +++ b/tools/js_optimizer.py @@ -224,6 +224,10 @@ EMSCRIPTEN_FUNCS(); total_size = len(js) js = None + if 'last' in passes and len(funcs) > 0: + if max([len(func[1]) for func in funcs]) > 200000: + print >> sys.stderr, 'warning: Output contains some very large functions, consider using OUTLINING_LIMIT to break them up (see settings.js)' + # if we are making source maps, we want our debug numbering to start from the # top of the file, so avoid breaking the JS into chunks cores = 1 if source_map else int(os.environ.get('EMCC_CORES') or multiprocessing.cpu_count()) |