[qooxdoo-devel] Introduce new tree compiler (as default)
Brought to you by:
ecker,
martinwittemann
From: Sebastian W. <in...@se...> - 2006-08-31 16:02:27
|
Hi qooxdoo community, another step forward to highly optimized applications based on qooxdoo: I would like to introduce the tree "compiler". The tree compiler is able to "compile" a syntax tree (generated by treegenerator.py which uses the tokenizer.py) back to optimized JavaScript code. In it's feature set it is comparable to our old compiler, which was directly based on the result of the tokenizer.py script. It removes comments, whitespaces and other optional stuff. This tree compiler is an important step, because it allows us to do the following awesome things in future: * Remove complete methods (debug statements, ...) * Remove cross-browser constructions and generate a version for each browser/engine. * Compress variable names * Lay out strings and reduce usage of simple constants (like "auto", "100%", ...) in future (Automatic IE performance improvement) * Obfuscate the whole application (variable, function and class names) etc. Now the interesting part: The tree compiler is the default from now on. It is already available in SVN and will be in the final release of qooxdoo 0.6. The whole qooxdoo is able to use the tree compiler and will use it now. The tree compiler was tested against qooxdoo and another big internal project so we think it's quite stable already. It may not be free of bugs already so I'm happy to fix bugs as fast as you can report them ;) If you have problems with this new compiler, you can use the old one using the "--use-token-compiler" argument (generator.py). Each Makefile which is included in qooxdoo, has a new variable (OLDCOMPILER) in the first lines of the file which lets you select the compiler (simply set it to "true"). I hope you enjoy this new era of JavaScript optimization. Kudos to Til - without the treegenerator.py developed by him, qooxdoo has maybe never seen such a tree based optimizer. You can immediately test the new version. It's also online available in the online demos (http://demo.qooxdoo.org) and the API viewer (http://api.qooxdoo.org). For all SDK/source version users: Please be sure to delete your ".cache". A "make distclean" for example will do this. Cheers, Sebastian |