Skip to content

Commit

Permalink
Remove warning about very large JS functions. (#20812)
Browse files Browse the repository at this point in the history
Users have little they can do if they see this warning, and we were showing it
even if the user built in the modes that the message suggest they use. in
addition, this warning is likely not important these days given the huge
improvements in JS VMs over the years.

Fixes #20811
  • Loading branch information
manxorist authored Nov 30, 2023
1 parent 65cd1d8 commit 9af9e58
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions tools/js_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,6 @@ def write_chunk(chunk, i):
if not os.environ.get('EMCC_NO_OPT_SORT'):
funcs.sort(key=lambda x: (len(x[1]), x[0]), reverse=True)

if 'last' in passes and len(funcs):
count = funcs[0][1].count('\n')
if count > 3000:
print('warning: Output contains some very large functions (%s lines in %s), consider building source files with -Os or -Oz)' % (count, funcs[0][0]), file=sys.stderr)

for func in funcs:
f.write(func[1])
funcs = None
Expand Down

0 comments on commit 9af9e58

Please sign in to comment.