Peter Bittner edited this page May 30, 2016 · 7 revisions


JavaScript code generated by the pyjs compiler pyjsbuild is relatively large, unobfuscated and uncompressed.

Reduce Size

Take a look at the pyjscompressor.py script in the contrib folder, which will do a great job in dramatically reducing the size of the generated JavaScript code.

Increase Speed

pyjsbuild command line switch -O, --enable-speed optimizes JavaScript output for speed.

Improving responsiveness may be able using the --enable-strict --disable-debug --dynamic-link command line switches. This generates more files instead of copying modules into *cache.html files.


Although there is no specific obfuscator provided for pyjs you can use any tool available for JavaScript code (e.g. see this StackOverflow question).