qmlweb / qmlweb-parser

A QML parser in JavaScript
Other
27 stars 11 forks source link

Investigate the possibility to port to UglifyJS 2 #4

Open ChALkeR opened 8 years ago

ChALkeR commented 8 years ago

Probably after #3.

ChALkeR commented 8 years ago

This is technically possible and not so hard to do, but the new output from UglifyJS2 is much more vebrose — this means that the runtime will consume more memory and will require to load larger files from the server when in pre-parsed mode.

We could investigate converting that into a shorter form suitable to use by qmlweb, though, but that will still slow down parsing.

Also, the parser itself became about two times larger (and I included only the required files).

ChALkeR commented 8 years ago

Filed a patch to uglify-js@2 that will allow us to wrap tokenizer() method in the meantime: https://github.com/mishoo/UglifyJS2/pull/1113 (it's somewhy not exported in uglify-js@2, but was exported in uglify-js@1).

Update: merged.

ChALkeR commented 8 years ago

uglify-js-2 branch has some initial work, mostly broken. It also requires the abovementioned UglifyJS2 patch.