aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-11-06 17:27:27 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-11-06 17:27:27 -0800
commit574156229c9b84f1ea583f0948dbb724368f458b (patch)
tree709169d6fc2a210a69a1c64a2e6bab50ed7aa18f
parent82dbac50600631907ecc43d55b174c23c9003607 (diff)
emscripten profiling cleanup
-rwxr-xr-xemscripten.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/emscripten.py b/emscripten.py
index 66fd3194..dcba8911 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -163,7 +163,7 @@ def emscript(infile, settings, outfile, libraries=[]):
chunks.append(curr)
curr = ''
if cores == 1: assert len(chunks) == 1, 'no point in splitting up without multiple cores'
- if DEBUG: print >> sys.stderr, ' emscript: phase 2 working on %d chunks %s (intended chunk size: %.2f MB, meta: %.2f MB, cores: %d)' % (len(chunks), 'in parallel' if len(chunks) > 1 else '', chunk_size/(1024*1024.), len(meta)/(1024*1024.), cores)
+ if DEBUG: print >> sys.stderr, ' emscript: phase 2 working on %d chunks %s (intended chunk size: %.2f MB, meta: %.2f MB)' % (len(chunks), ('using %d cores' % cores) if len(chunks) > 1 else '', chunk_size/(1024*1024.), len(meta)/(1024*1024.))
commands = [(i, chunk + '\n' + meta, settings_file, compiler, forwarded_file, libraries) for chunk in chunks]
@@ -207,9 +207,9 @@ def emscript(infile, settings, outfile, libraries=[]):
open(post_file, 'w').write(''.join(post) + '\n' + meta)
out = shared.run_js(compiler, shared.COMPILER_ENGINE, [settings_file, post_file, 'post', forwarded_file] + libraries, stdout=subprocess.PIPE, cwd=path_from_root('src'))
js += out
+ js = indexize(js)
if DEBUG: print >> sys.stderr, ' emscript: phase 3 took %s seconds' % (time.time() - t)
- js = indexize(js)
outfile.write(js) # TODO: write in parts (see previous line though)
outfile.close()